My first 'useful script'.
Basically, you can /msg whoever is hosting it with the stated formula, and when the user that was 'emailed' comes online, they will be able to see the message you sent them, even if you are offline.
Note: This is only the first draught of the script, and there are a few things I need to fix for the second. (Mostly that you can see a message just by going onto a nick, not having to actually identify).
Big thanks to Deku_Link.
;Made by Deku_Link and Hydroxide.
;Contact Info: irc.dejatoons.net | #Pokedex
;Formula: /msg [SCRIPT HOSTER] !givemsg [NICK] [MESSAGE]
on *:TEXT:!help givemsg:#: {
.notice $nick To send a message to someone, and then let them view it when they get online next, type /msg Toothache !givemsg [nick] [message].
.notice $nick Note: The actual formula does not need the brackets.
.notice $nick Note: The script only works for users registered with nickserv.
}
; 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 in messages.ini
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
}