X/channel modes Usefull Inputs.

By xplo on Sep 03, 2008

This is a easy inputs remotes, that will work with X on undernet, i just didn't put the login one
because its not 100% safe.

imagine if you typed /remote off and you type xlogin user pass

you would spam it in the channel.

and there is a regex for channel modes,
examples

+m
+i
+s
-m
-i
-s

Enjoy..!!

on 1:input:#:{
  if ($regex($1,/^[+-][bklimnpstrDLdRcOAQKVCuzNSMTG]$/)) { mode $chan $1- | HALT }
  if ($1 == xa) { msg x access $chan = $+ $2- | HALT }
  if ($1 == xvoice) { msg x voice $active $2- | HALT }
  if ($1 == xdevoice) { msg x devoice $active $2- | HALT }
  if ($1 == op) { mode $chan +o $2- | HALT }  
  if ($1 == deop) { mode $chan -o $2- | HALT }  
  if ($1 == voice) { mode $chan +v $2- | HALT }
  if ($1 == devoice) { mode $chan -v $2- | HALT }
  if ($1 == xop) { msg x op $active $2- | HALT }
  if ($1 == xdeop) { msg x deop $active $2- | HALT }
  if ($1 == xkick) { msg x kick $active $2- | HALT }
  if ($1 == xban) { msg x ban $active $2- | HALT }
  if ($1 == xunban) { msg x unban $active $2- | HALT }
  if ($1 == xadd) { msg x adduser # = $+ $2- | HALT }
  if ($1 == xrem) { msg x remuser # = $+ $2- | HALT } 
  if ($1 == xpart) { msg x part $active $2- | HALT }
  if ($1 == xstat) { msg x status $active | HALT }
  if ($1 == xjoin) { msg x join $active $2- | HALT }
  if ($1 == xreg) { msg x register $active $2 | HALT }  
  if ($1 == xn) { msg x set $active noop $2- | HALT }
  if ($1 == xs) { msg x set $active strictop $2- | HALT }
  if ($1 == xt) { msg x topic $active $2-40 | HALT }
  if ($1 == xm) { msg x modinfo $active access = $+ $2- | HALT }
  if ($1 == xmop) { msg x modinfo $active automode = $+ $2 op - | HALT }
  if ($1 == xmv) { msg x modinfo $active automode = $+ $2 voice - | HALT }
  if ($1 == xmn) { msg x modinfo $active automode = $+ $2 none - | HALT }
  if ($1 == xmod) { msg x access $chan = $+ $2 -modif -| HALT }
  if ($1 == xsus) { msg x suspend $active = $+ $2- | HALT }
  if ($1 == xusus) { msg x unsuspend $active = $+ $2 - | HALT }
  if ($1 == xinfo) { msg x info = $+ $2- | HALT }
  if ($1 == xjoin) { join # $2- | HALT }
  if ($1 == xverify) { msg x verify $2- | HALT }
  if ($1 == xpart) { part $active- | HALT }
  if ($1 == xbanlist) { msg x lbanlist # $2- | HALT }
}

Comments

Sign in to comment.
Wizjany   -  Sep 19, 2008

Yea but it's $2-40 not $2-$40

@$2- not @$2-40

@cmitch1120 - either would work...you can also just remove the halts because $1 can't be more than one thing...
elseif's and if's are interchangeable
also, many people won't use else's but just do a halt and then the command on the next line

 Respond  
cmitch1120   -  Sep 19, 2008

Why instead of using a | HALT } then a new if.. just not use elseif's? Just wondering, maybe your method is different than mine. =)

 Respond  
guest598594   -  Sep 16, 2008

Yea but it's $2-40 not $2-$40

 Respond  
Wizjany   -  Sep 16, 2008
if ($1 == xt) { msg x topic $active $2-$40 | HALT }

Should be either $2-40 or $2-

i think he was trying to make sure it would be under 40 words

 Respond  
guest598594   -  Sep 15, 2008

Anyways, with

if ($1 == xrem) { msg x remuser # = $+ $2 $3- $4- | HALT }

You have $2 $3- $4-, so it'll screw up.

 Respond  
Paul_1337noob   -  Sep 15, 2008

why use

 if ($1 == xadd) { msg x adduser # = $+ $2 $3 $4- | HALT } 

just use

 if ($1 == xadd) { msg x adduser # = $+ $2- | HALT } 

also here

if ($1 == xrem) { msg x remuser # = $+ $2 $3- $4- | HALT }

ugh $2 $3- $4-

what u trying to achieve XD?

once again $2- will do XD

 Respond  
guest598594   -  Sep 15, 2008
  if ($1 == xt) { msg x topic $active $2-$40 | HALT }

Should be either $2-40 or $2-

 Respond  
xplo   -  Sep 15, 2008

fixed :p lmao.

actually i didn't know for $2-$40
thnx

 Respond  
Wizjany   -  Sep 03, 2008

$2-40 should work...

 Respond  
Eugenio   -  Sep 03, 2008

rofl @ $40

 Respond  
guest598594   -  Sep 03, 2008
  if ($1 == xt) { msg x topic $active $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $29 $30 $31 $31 $32 $32 $33 $34 $35 $36 $37 $38 $39 $40 | }

You forgot the "HALT" after the "|"

 Respond  
^Neptune   -  Sep 03, 2008

DragonFlare: What would you need regex here for...?

 Respond  
napalm`   -  Sep 03, 2008

LoL @ $2 $3 $4 $5 ... $40

 Respond  
DragonFlare   -  Sep 03, 2008

Regular Expressions i only know the basics of them for mirc
:(

 Respond  
Paul_1337noob   -  Sep 03, 2008
 if ($1 == xt) { msg x topic $active $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $29 $30 $31 $31 $32 $32 $33 $34 $35 $36 $37 $38 $39 $40 | }

can also be

 if ($1 == xt) { msg x topic $active $2- | halt }

$N- Nth term and everything after it
or $N-P everything from N till P
so if you must

if ($1 == xt) { msg x topic $active $2-40 | halt }

p.s. you also missed the halt after | in that 1

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.