admin regex script

By Rawee on Sep 02, 2010

regex command script updated
company coded by LucSatise and Rawee

alias Jcommands {
  echo -a 14 The available channel commands are: 7+/-i14,7 +/-l <limit>14, 7+/-m14, 7+/-p14, 7+/-R14, 7+/-s14, 7+/-k <key>14, 7.i <nick>14, 7.akick <nick> <reason>14, 7.delakick <nick>14, 7.akicklist14, 7.add <nick> <access level>14, 7.del <nick>14, 7.access14.
  echo -a 14 The available nick commands are: 7+/-o <nick>14, 7 +/-h <nick>14, 7+/-v <nick>14, 7.kb <nick>14, 7.ban <nick>14, 7.tkb <nick> <time>14, 7.k <nick>14, 7+/-q <nick>14, 7.unban <nick>14.
}

on *:input:#: {
  if ($regex($1,/^[+-][ceIfijklmnpstzCGMKLNQRSTuAO]$/)) { mode $chan $1- }
  if ($regex($1,/^[+-][qaovh]$/)) { mode $chan $1 $iif(!$2,$nick,$2) }
  if ($1 == .kb) { ban -k $chan $2 $3- }
  if ($1 == .b) { mode $chan +b $address($2,2) }
  if ($1 == .tkb) { ban -ku $+ $2 $chan $2 14 You have been banned for7 $3 14Seconds from7 $chan $+ 14. }
  if ($1 == .i) { invite $2 $chan }
  if ($1 == .k) { kick $chan $2 $3- }
  if ($1 == .akick) { msg ChanServ akick $chan add $2 $3 }
  if ($1 == .delakick) { msg ChanServ akick $chan del $2 }
  if ($1 == .akicklist) { msg Chanserv akick $chan list }
  if ($1 == .add) { cs access $chan add $2 $3 }
  if ($1 == .access) { cs access $chan list }
  if ($1 == .del) { cs access $chan del $2 }
  if ($1 == .ub) { mode $chan -b $address($2,2) }
  if ($1 == .vop) { .msg chanserv vop $chan add $2 }
  if ($1 == .hop) { .msg chanserv hop $chan add $2 }
  if ($1 == .aop) { .msg chanserv aop $chan add $2 }
  if ($1 == .sop) { .msg chanserv sop $chan add $2 }
  if ($1 == .dvop) { .msg chanserv vop $chan del $2 }
  if ($1 == .dhop) { .msg chanserv hop $chan del $2 }
  if ($1 == .daop) { .msg chanserv aop $chan del $2 }
  if ($1 == .dsop) { .msg chanserv sop $chan del $2 }
  if (a isincs $usermode) {
    if ($1 == .sajoin) { sajoin $2 $chan }
    if ($1 == .sapart) { sapart $2 $chan }
    if ($1 == .svspart) { svspart $2 $chan }
    if ($1 == .svsjoin) { svsjoin $2 $chan }
    if ($1 == .svshop) { svspart $2 $chan | svsjoin $2 $chan }
    if ($1 == .fid) { os forceid $2 }
    if ($1 == .deoper) { svso $2 - }
    if ($1 == .ogag) { svso  $2 - | svsmode $2 +d | shun $2 gagged }
    if ($1 == .uogag) { svsmode $2 -d | shun - $+ $2 }
    if ($1 == .nick) { svsnick $2 $3 $ctime }
    if ($1 == .u) { 
      if (!$2) { uline $me } 
         else { uline $2 } }
    if ($active == #Opers) {
      if ($1 == .dc5) { os defcon 5 | os global Defcon is now back to Normal. Sorry for any Inconvenience. }
      if ($1 == .dc4) { os defcon 4 | os global We have just gone to Defcon4. No Channels/Nicks can be registered, Channel MLOCKS cannot be Changed and Session limit of 1 Activated. }
      if ($1 == .dc3) { os defcon 3 | os global We have just gone to Defcon3. No Channels/Nicks can be registered, Channel MLOCKS cannot be Changed, Session limit of 1 and Channel modes Enforced (+RiKVCMc) }
      if ($1 == .dc2) { os defcon 2 | os global We have just gone to Defcon2. No Channels/Nicks can be registered, Channel MLOCKS cannot be Changed, Session limit of 1 and Channel modes Enforced (+RiKVCMc). Users also cannot use Services. }
      if ($1 == .dc1) { os defcon 1 | os global We have just gone to Defcon1. No Channels/Nicks can be registered, Channel MLOCKS cannot be Changed, Session limit of 1 and Channel modes Enforced (+RiKVCMc). Services cannot be used by Users and new connections will be killed. }
    }
    if ($1 == .csareg) { cs saregister $2 $3 $4 }
    if ($1 == .nsareg) { ns saregister $2 $3 $4 }
    if ($1 == .nsagroup) { ns sagroup $2 $3 }
    if ($1 == .nsdrop) { ns drop $2 }
  }
}

Comments

Sign in to comment.
WorldDMT   -  Sep 03, 2010

about if ($1 == .kb) { ban -k $chan $2 $3- }
i think /ban isnt like mode # +b so /ban $2 will ban only the nick not the host
ban his host is better just add "2" after $2
if ($1 == .kb) { ban -k $chan $2 2 $3- }

 Respond  
LucSatise   -  Sep 03, 2010

the server i coded that part for doesnt send the notice. I disabled the notice since services never told the users what couldnt be done or what happens at that level.

 Respond  
napa182   -  Sep 03, 2010

from the name of ur snippet i was kinda thinking there would be more regexs used =/

anyways for the defcon it's kinda pointless to send the global notices when services already do that.
and you could have done something like this for the defcon

if ($regex($1,/^\.dc([1-5])$/iS)) { .os defcon $regml(1) }

as well you can make a lot of ur code a bit shorter...

 Respond  
Burrito   -  Sep 02, 2010

Cool. Could use more regex for all the *op commands though

 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.