Top

Modes Input - Regex


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  4.0
Scores Submitted  1
Date Added  Jun 18, 2008
Last Updated  Jun 18, 2008
Tags  channel  conrtol  dialog  input  irc  ircd  jonesy  jonesy44  mirc  mode  modes  regex  user 
  Bookmark and Share

Introduction

Well, sorta my first go with regex :]

ircD Script. Unless you edit it.

Well, i find it really usefull rather than having to type /mode #chan +xx or w/e
With this. just type;

Code:
+/-(mode) <nick(s)>


Channel modes: ntimsp
User Modes: vhoaqeb

THE MASS MODE PART OF THE SCRIPT IS BY LINDRIAN.

Grab the Code

Comments

  (10)  RSS
jonesy44
Comments: 1,085
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 11:54 am
Rate it or hate it ;D
LucSatise
Comments: 122
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 3:20 pm
wuts $ctrlenter ?
EL
Comments: 1,382
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 3:24 pm
Quote:

Rate it or hate it ;D

ROFL that my line bish:P
mountaindew
Comments: 1,645
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 4:06 pm
Quote:

wuts $ctrlenter ?

When you hold control and hit enter.
jonesy44
Comments: 1,085
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 5:11 pm
I know El. ;D
.. Yoink! :P

Luc, MD ^

Also, MD, i've updated the snippet. but i couldn't work out how to use regex for the last elseif.?
jonesy44
Comments: 1,085
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 5:13 pm
Code:
    elseif ($mid($1-,1,2) == ++ || $mid($1-,1,2) == --) {


I tried ..

Code:
    elseif ($regex($mid($1-,1,2),(++|--))) {

Code:
    elseif ($regex($mid($1-,1,2),[++|--])) {

Code:
    elseif ($regex($mid($1-,1,2),[(++)|(--)])) {


.. a bit of everything really.. but the mirc help file on regex's is shoot.
mountaindew
Comments: 1,645
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 5:35 pm
Code:

/^--|\+\+$/

The first one, you need to escape the + with \

The second one, the [ ]'s mean it does one character from there, like gr[ea]y (gray or grey)

And the third one I don't think you can backref in [ ]'s

Edit: ugh, the comments strip backslashes

so it's:

/^--|BACKSLASH+BACKSLASH+$/
Lindrian
Comments: 755
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 8:14 pm
- is no metacharacter, only + is. So you only have to escape +.
EL
Comments: 1,382
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 18, 2008 9:38 pm
Hmm works for me man well done."Rate it or Hate it?"...7.10.`-.-ยด
jonesy44
Comments: 1,085
 
mIRC Snippet:  Modes Input - Regex
Posted on Jun 19, 2008 1:09 pm
Thanks for that MD, Lindrian, EL

Wondering if any of ya'll know of a good regex website which explains all the / ^ $ n all that.

I've googled it, Mirc help file'd it .. ech

Please Register or Login to start posting comments.
Bottom