Mail Script - 29/11/07 08:18 PM
Email Script.
This is my Email script. Everything works on it, apart from one problem: it still shows messages to nicks even if they aren't identified with nickserv.
My first 'useful' script, and I am still new to it, so please don't confuse me with stuff I don't know
Anyway, it needs to connect to nickserv and see if the nick is identified before giving the message if there is any. I have no clue on how to do this, so please help!
PS. Me = Hydroxide
Code:
;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 }
This is my Email script. Everything works on it, apart from one problem: it still shows messages to nicks even if they aren't identified with nickserv.
My first 'useful' script, and I am still new to it, so please don't confuse me with stuff I don't know
Anyway, it needs to connect to nickserv and see if the nick is identified before giving the message if there is any. I have no clue on how to do this, so please help!
PS. Me = Hydroxide