daily pastebin goal
28%
SHARE
TWEET

note system

Seb Jul 18th, 2010 (edited) 273 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. alias note.add {
  2.   if ($hget(jnotes) != jnotes) { hmake jnotes }
  3.   hadd jnotes $1 $2-
  4.   echo -at Note Added for $1  $+ $2- $+ .
  5. }
  6.  
  7. alias note.del {
  8.   var %i = 1
  9.   while (%i <= $hget(jnotes,0).item) {
  10.     if ($hget(jnotes,%i).item == $1) {
  11.       hdel jnotes $1
  12.       echo -at Note Deleted for $1
  13.     }
  14.     inc %i
  15.   }
  16. }
  17.  
  18. alias notes {
  19.   echo $color(notice) -at Note System help
  20.   echo $color(notice) -at /note.list               :: Show the notes added to the database.
  21.   echo $color(notice) -at /note.del <nick>         :: Delete a note from the database.
  22.   echo $color(notice) -at /note.add <nick> <info>  :: Add some infos to the database
  23.   echo $color(notice) -at /note.credits            :: Informations about the author.
  24.   echo $color(notice) -a Example /note.add $me I am really hot, and you know it!  
  25. }
  26.  
  27. alias note.credits {
  28.   echo -at This script was written by xplorer@live.ca
  29.   echo -at You can find me on /server -m irc.undernet.org -j #mircscripting
  30.   echo -at Feel free to modify it as you wish, but it would be nice to send me your copy, so i could get another version out.
  31.   echo -at Improvements are allways welcomed.
  32. }
  33.  
  34. alias note.list {
  35.   window -k0 @Notes 10 10
  36.   aline @Notes [Listing Join notes Database]
  37.   .timer 1 3 aline @Notes 4Double-Click in this window to close it.
  38.   var %i = 1
  39.   if ($hget(jnotes)) {
  40.     while (%i <= $hget(jnotes,0).item) {
  41.       aline @Notes 4,1[ $+ $hget(jnotes,%i).item $+ 4]: $hget(jnotes,$hget(jnotes,%i).item)
  42.       inc %i
  43.     }
  44.   }
  45. }
  46.  
  47. on *:EXIT:{ hsave jnotes jnotesystem.txt }
  48. on *:DISCONNECT:{ hsave jnotes jnotesystem.txt }
  49. on *:START:{ hmake jnotes | hload jnotes jnotesystem.txt }
  50.  
  51. on ^*:JOIN:#:{
  52.   var %i = 1
  53.   while (%i <= $hget(jnotes,0).item) {
  54.     if ($nick == $hget(jnotes,%i).item) {
  55.       echo $color(join) $chan $timestamp * Joins: $nick ( $+ $gettok($address($nick,5),2,33) $+ )
  56.       echo $color(notice) $chan ### [Note] $+([,$nick,]) - $hget(jnotes,$nick)
  57.       haltdef
  58.     }
  59.     inc %i
  60.   }
  61. }
  62. menu @notes {
  63.   dclick: window -c @notes
  64. }
RAW Paste Data
Top