Advertisement
glacier_rat

Glacier_Rat

Aug 16th, 2010
2,937
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on $*:TEXT:/^[.!](del|view|add)(rsn|notes)/Si:#celestial_skillers_staff: {
  2.   if ($me == Celestialskillersbot) {  
  3.     if ($regml(1) == add) {
  4.       var %x 1
  5.       while ($readini(notes.ini,n,$2,n $+ %x)) inc %x
  6.       writeini -n notes.ini $2 $+(n,%x) $c1($nick,Note: $3-) $c1($nick,Note By $nick $date $time GMT)
  7.       notice $nick $c1($nick,Notes) $+ 1 %x $c1($nick,For) $c2($nick,$2) $c1($nick,has been saved.)
  8.     }
  9.     elseif ($regml(1) == del) {
  10.       if ($remove($3,-) !isnum) {
  11.         if ($readini(notes.ini,n,$2,n1)) {
  12.           remini -n notes.ini $2
  13.           notice $nick $c1($nick,Notes for) $c2($nick,$2) $c1($nick,Deleted.)
  14.         }
  15.         else {
  16.           notice $nick $2 has no notes.
  17.         }
  18.       }
  19.       else {
  20.         var %x 1
  21.         while ($readini(notes.ini,n,$2,n $+ %x)) {
  22.           if (%x isnum $3) {
  23.             remini -n notes.ini $2 $+(n,%x)
  24.             notice $nick $c1($nick,Note) $+ 1 %x $c1($nickFor) $c2($nick,$2) $c1($nick,Deleted.)
  25.           }
  26.           inc %x
  27.         }
  28.         ncleanup $2
  29.       }
  30.     }
  31.     elseif ($regml(1) == view) {
  32.       if ($readini(notes.ini,n,$2,n1)) {
  33.         notice $nick $c1($nick,Notes For) $c2($nick,$2) $+ $c1($nick,:)
  34.         var %x 1
  35.         while ($readini(notes.ini,n,$2,n $+ %x)) {
  36.           notice $nick 1 %x $+ : $c1($nick,$v1)
  37.           inc %x
  38.         }
  39.       }
  40.       else {
  41.         notice $nick $c1($nick,$2) $c2($nick,Has No Notes.)
  42.       }
  43.     }
  44.   }
  45.   alias -l ncleanup {
  46.     var %x 1
  47.     while ($ini(notes.ini,$1,%x)) {
  48.       hadd -m $+(notes.,$1) %x $readini(notes.ini,n,$1,$v1)
  49.       inc %x
  50.     }
  51.     remini notes.ini $1
  52.     var %x 1
  53.     while ($hget($+(notes.,$1), %x)) {
  54.       writeini notes.ini $1 $+(n,%x) $v1
  55.       inc %x
  56.     }
  57.     hfree $+(notes.,$1)
  58.   }
  59. }
  60. alias c1 return $+($chr(3),$iif($readini(botinfo.ini,n,color1,$1) != $null,$readini(botinfo.ini,n,color1,$1),10),$2-)
  61. alias c2 return $+($chr(3),$iif($readini(botinfo.ini,n,color1,$1) != $null,$readini(botinfo.ini,n,color2,$1),14),$2-)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement