All pastes #799798 Raw Edit

Unnamed

public text v1 · immutable
#799798 ·published 2007-11-27 21:48 UTC
rendered paste body
; This will set a true variable if NickServ replies giving you that the nick is registered
on *:NOTICE:*Time registered*:*:{
  if ($nick == NickServ) {
    /set %regnick true
  }
}
;This will ask NickServ if the nick in question has been registered. Timer delay (2 s) to give NickServ
;some time to reply.
on *:TEXT:!givemsg*:?:  {
  /msg nickserv info $2
  timer 1 2 response $nick $2 $3-
} 
;This will save your message for people.
on *:JOIN:#: { 
  if ($readini(messages.ini,memory,$nick)) { 
    .notice $nick $readini(messages.ini,memory,$nick ) 
    .remini messages.ini memory $nick 
  }
}
;Alias called by timer earlier, determines if msg will be saved or not.
alias response {
  if (%regnick == true) {
    .writeini messages.ini memory $2 $1 sent you a message at: $time $+ , $date $+ . Message: $3-
    .notice $1 Message stored.
  }
  else {
    .notice $1 That nick is not registered.
  }
  /unset %regnick
}