Guest User

Untitled

a guest
Oct 18th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.27 KB | None | 0 0
  1. alias loc return $iif($chan,$v1,$nick)
  2.  
  3. on $*:text:/^(!|@)rules\b/Si:*: {
  4.   tokenize 32 $strip($1-)
  5.   if ($2 == add) {
  6.     if ($left($nick($chan,$nick).pnick,1) == &) || ($left($nick($chan,$nick).pnick,1) == ~) {
  7.       if ($3) {
  8.         writeini rules.ini $chan $3-
  9.         msg $chan 4" $+ $3- $+ " Added by $nick
  10.       }
  11.     }
  12.   }
  13.   if ($2 == del) {
  14.     if ($left($nick($chan,$nick).pnick,1) == &) || ($left($nick($chan,$nick).pnick,1) == ~) {
  15.       if ($3) {
  16.         if ($readini(rules.ini,n,$chan,$3)) {
  17.           remini rules.ini $chan $3-
  18.           .msg $chan 4Removed $3- from rules list.
  19.         }
  20.       }
  21.       else {
  22.         msg $chan 4No such Rule entry.
  23.         .notice $nick 4To see the list of Rule List Entries, type !Rules <list>
  24.       }
  25.     }
  26.   }
  27.   if ($2 == list) && ($ini(rules.ini,$chan,0)) {
  28.     .msg $loc 4Displaying A List Of Rules For $loc $+ :
  29.     var %a 1, %z $ini(Rules.ini,$chan,0)
  30.     while (%a <= %z) {
  31.       .msg $loc 04 $+ %a $ini(rules.ini,$chan,%a) $readini(rules.ini,n,$chan,$ini(rules.ini,$chan,%a))
  32.       inc %a
  33.     }
  34.     .msg $chan 4End of list. %z entry(s) displayed.
  35.   }
  36.   elseif ($2 == list) && (!$ini(rules.ini,$chan,0)) {
  37.     .msg $loc 04Sorry $nick $+ , there are currently no rules for $chan $+ .
  38.   }
  39. }
Add Comment
Please, Sign In to add comment