Hi,
Start --> Run --> wordpad --> paste code --> copy code to mIRC Scripts Editor:
menu channel {
.$iif($group(#urlscript) == on,Disable,Enable) URL Script:{
$iif($group(#urlscript) == on,disable,enable) #urlscript
}
}
[color:red] [/color]
#urlscript on
on *:START: hmake urls | hload urls urls.txt
on *:EXIT: hsave urls urls.txt
[color:red] [/color]
on *:TEXT:*:#ghost6303:{
if ($1-2 == !setlink $nick) && $3 {
if !$regex($3,/^http:\/\/www\.plattleround\.com\/recruit\.php\?id=\d+$/i) {
ban -ku30 # $nick 2 Incorrect url syntax.
return
}
hadd urls $nick $3
msg # $nick This link $3 has been added to your account
}
elseif ($1 == !getlink) && $hget(urls,$2) {
msg # This is $2's link: $ifmatch
}
elseif ($1 == !mylink) && $hget(urls,$nick) {
msg # $nick Your current url: $ifmatch
}
}
#urlscript end
1. The script is now limited to 1 link per user, so if a user adds a new link, the old one is overwritten.
2. Note that you don't have to put #ghost6303 within the event, because right now the script only reacts when it's in channel #ghost6303, so the # will be filled with that channel name.
3. I've changed the hash table to be saved in non-ini format. Originally I set it that way, so that you have good readability when you are viewing the text file yourself, however, it entered my mind that nicknames with [ ] surrounding their nick, will be saved as ~nick~, thus corrupting the nickname. This is because mIRC would interpret the nickname as a section from an ini file. So you should clear the urls.txt file, to start over.
Enjoy