Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

!memo Script

Recommended Posts

  • Administrators
!memo | <message> <p>!mlist </p> <p>!read <n> </n></p> <p>!delete <n> </n></p> <p> </p> <p>Make sure the | is in the !memo command.</p></message>

 

>on *:TEXT:!memo *:#: {  tokenize 124 $2-  write memo.txt $1 $chr(124) $nick $chr(124) $2  notice $nick Memo sent.}on *:TEXT:!mlist:#: {  var %x 1  while ($read(memo.txt,%x)) {    notice $nick [Memo] %x $chr(124) [Title] $gettok($v1,1,124) $chr(124) [Nick] $gettok($v1,2,124) $chr(124) [Message] $gettok($v1,3,124)    inc %x  }  if (!$read(memo.txt,1)) { notice $nick There aren't any memos stored right now. }}on *:TEXT:!read *:#: {   if ($read(memo.txt,$$2)) { notice $nick $v1 }   else notice $nick No such memo $2}on *:TEXT:!delete *:#: {   if ($read(memo.txt,$$2)) {    write -dl $+ $2 memo.txt     notice $nick Memo $2 has been deleted  }   else notice $nick There is no such memo $2}

Link to comment
Share on other sites



×
×
  • Create New...