Public paste
Undefined
By: biggie | Date: Feb 23 2007 14:31 | Format: None | Expires: never | Size: 2.72 KB | Hits: 828

  1. ;Syntax:
  2. ;/seen on/off
  3. ;/seen add/del (word) [This is to stop people trying to do stuff like, !seen penis, or something  stupid.]
  4. ;/msg #channel/bot !seen name
  5.  
  6.  
  7. alias seen {
  8.   if ($1 == del) && ($2) {
  9.     if (!$read(funny.txt, w, $2)) { echo -a Error: $+(",$2,") is not in the database. | return }
  10.     write -dw $+ $2 funny.txt
  11.     echo -a Removed: $+(",$2,",.) From the 'funny' words list.
  12.     return
  13.   }
  14.   if ($1 == add) && ($2) {
  15.     if ($read(funny.txt, w, $2)) { echo -a Error: $+(",$2,") is already in the database. | return }
  16.     write funny.txt $2
  17.     echo -a Added: $+(",$2,",.) To the 'funny' words list.
  18.     return
  19.   }
  20.   if ($1 == on) {
  21.     echo -a Seen Status: On
  22.     set %seen on
  23.     return
  24.    }
  25.   if ($1 == off) {
  26.     echo -a Seen Status: Off
  27.     set %seen off
  28.     return
  29.   }
  30.   echo -a Unknown parameter.
  31. }
  32. on *:text:!seen*:*:{
  33.   if (%seen == off) { return }
  34.   var %target = $iif($chan,$chan,$nick)
  35.   if (!$2) { notice $nick seen whom? | return }
  36.   if ($2 == $nick) {
  37.     describe %target hands $nick a mirror.
  38.     return
  39.   }
  40.   if ($chan) && ($2 ison $chan) {
  41.     msg %target $2 Is in the channel! $iif(%last.spoke. [ $+ [ $2 ] ],His/her last words were: %last.spoke. [ $+ [ $2 ] ],They haven't spoken anything yet!)
  42.     return
  43.   }
  44.   if (!%seen. [ $+ [ $2 ] ] ) {
  45.     if ($read(funny.txt, w, $2)) {
  46.       msg %target hoho. aren't you a funny one
  47.       halt
  48.     }
  49.     if (!%seen. [ $+ [ $2 ] ] ) {
  50.       msg %target i have never seen $2 | return
  51.     }
  52.   }
  53.   if (%seen. [ $+ [ $2 ] ] ) {
  54.     msg %target I last saw $2 %seen. [ $+ [ $2 ] ] That was $duration($calc($ctime - %seen.last. [ $+ [ $2 ] ] )) ago. $iif(%last.spoke. [ $+ [ $2 ] ],If i remember correctly.. his last words were: %last.spoke. [ $+ [ $2 ] ],He left without saying anything!)
  55.   }
  56. }
  57.  
  58. on *:NICK:{
  59.   if (%seen == off) { return }
  60.   set %seen. [ $+ [ $nick ] ] ( $+ $address($nick,2) $+ ) changing his/her nickname to $newnick
  61. }
  62.  
  63. on *:kick:{
  64.   if (%seen == off) { return }
  65.   set %seen. [ $+ [ $knick ] ] ( $+ $address($nick,2) $+ ) being kicked from $chan by $nick
  66.   set %seen.last. [ $+ [ $knick ] ] $ctime
  67. }
  68.  
  69. on *:JOIN:#:{
  70.   if (%seen == off) { return }
  71.   set %seen. [ $+ [ $nick ] ] $address($nick,2) Joining channel $chan at $fulldate
  72.   set %seen.last. [ $+ [ $nick ] ] $ctime
  73. }
  74.  
  75. on *:text:*:#:{
  76.   if (%seen == off) { return }
  77.   set %last.spoke. [ $+ [ $nick ] ] $1-
  78. }
  79.  
  80. on *:quit:{
  81.   if (%seen == off) { return }
  82.   set %seen. [ $+ [ $nick ] ] $address($nick,2) Quitting at $fulldate
  83.   set %seen.last. [ $+ [ $nick ] ] $ctime
  84. }
  85.  
  86. on *:part:#:{
  87.   if (%seen == off) { return }
  88.   set %seen. [ $+ [ $nick ] ] $address($nick,2) Parting at $fulldate
  89.   set %seen.last. [ $+ [ $nick ] ] $ctime
  90. }
  91.