Antoshi Note System — File Browser

AntoshiNoteSystemv1.2 / AntoshiNoteSystemv1.2 / notelogger.mrc

notelogger.mrc — 3.51 KB — Download this file

#addnote on
on *:TEXT:!addnote*:#:{
  if ($2 == $null) {
    .notice $nick ( Antoshi Note System ) !addnote is for letting other users add notes to the note database. Ex: !addnote [17:55] <Antoshi> Hi!.
    halt
  }
  else {
    addnote $2- (Contributed by $nick $+ )
  }
}
#addnote end
#ans on
ON *:LOAD:{
  echo -a Antoshi Note System successfully loaded!
  load -rs floodprotect.mrc
}
on *:TEXT:!note*:#:{
  if ($2 != $null) && ($2 !isnum) {
    .notice $nick ( Antoshi Note System ) !note is only for numbers. Ex: !note $rand(1,$lines(notes.txt)) $+ . !search is for searching words. Ex: !search $2 $+ .
    halt
  }
  else {
    note $2
  }
}
on *:TEXT:!commands:#:{
  .notice $nick This is the ANS by Antoshi. To find a note by its number, type !note <number>. To search for a keyword, type !search <word> <number to start from>(optional). To see the newest note, type !newnote. To view the total number of notes, type !total. And, to add your own note, type !addnote <text>. ©2005 antoshi@gmail.com
}
on *:TEXT:!help:#:{
  .notice $nick This is the ANS by Antoshi. To find a note by its number, type !note <number>. To search for a keyword, type !search <word> <number to start from>(optional). To see the newest note, type !newnote. To view the total number of notes, type !total. And, to add your own note, type !addnote <text>. ©2005 antoshi@gmail.com
}
on *:TEXT:!total:#:{
  total
}
on *:TEXT:!newnote:#:{
  newnote
}
on *:TEXT:!search*:#:{
  if ($3 != $null) && ($3 !isnum) {
    .notice $nick ( Antoshi Note System ) !search is for searching words and, if necessary, a line number to start searching from. Ex: !search $2 $rand(1,$lines(notes.txt)) $+ .
    halt
  }
  else {
    search $2 $3
  }
}
alias note {
  if ($1 == $null) {
    msg $chan Random Note: $read($scriptdirnotes.txt)
    halt
  }
  if (!$read($scriptdirnotes.txt,$1)) {
    msg $chan Selected Note: ( Note $1 ) Not Found!
    halt
  }
  else {
    msg $chan Selected Note: ( Note $1 ) $read($scriptdirnotes.txt,$1)
  }
}
alias newnote {
  msg $chan Newest Note: $read($scriptdirnewnote.txt)
}
alias total {
  msg $chan Total Number of Notes:  $+ $lines(notes.txt)
}
alias search {
  if (!$1) {
    msg $chan Random Note: $read($scriptdirnotes.txt)
    halt
  }
  if (!$read($scriptdirnotes.txt,w,* $+ $1 $+ *)) {
    msg $chan Note Search: ( " $1 " ) Not Found!
    halt
  }
  if (!$2) {
    msg $chan Note Search: ( " $1 " ) $read($scriptdirnotes.txt,w,* $+ $1 $+ *)
    halt
  }
  if (!$read($scriptdirnotes.txt,w,* $+ $1 $+ *,$2)) {
    msg $chan Note Search: ( " $1 " , Starting From $2 ) Not Found!
    halt
  }
  else {
    msg $chan Note Search: ( " $1 " , Starting From $2 ) $read($scriptdirnotes.txt,w,* $+ $1 $+ *,$2)
  }
}
alias addnote {
  write " $+ $scriptdirnotes.txt $+ "  $+ $calc($lines(notes.txt) + 1) $+ . $1-
  write -c " $+ $scriptdirnewnote.txt $+ "  $+ $lines(notes.txt) $+ . $1-
  msg $active Added Note: $lines(notes.txt) $+ . $1-
}
alias editnotes {
  /run notes.txt
}
#ans end
Menu Channel {
  Antoshi Note System
  .Edit Notes: /run notes.txt
  .!addnote Off: .disable #addnote | echo $active !addnote Command Is Now: Off!
  .!addnote On: .enable #addnote | echo $active !addnote Command Is Now: On!
  .Turn ANS Off: .disable #ans | .disable #floodp | .disable #addnote | echo $active Antoshi Note System Is Now: Off!
  .Turn ANS On: .enable #ans | .enable #floodp | .enable #addnote | echo $active Antoshi Note System Is Now: On!
}