Just a simple on join to show beginners
Platform: mIRC
Published Sep 01, 2008
Updated Sep 02, 2008
<^> Please Note and take heed. This is for a demo purpose ONLY to show those with little scripting knowledge. further snippets like this, when made are posted in the Forum under the section " mIRC Tutorials". They do not get posted in the snippets area. <^>
The URL for the mIRC Tutorials page is
http://www.hawkee.com/phpBB2/viewforum.php?f=22
I am going to go back to basics for the sole purpose of some of the new (non scripters) that have been popping up on the server. The snippet code is also commented to show what the various lines are doing.
This is a extremely basic on join snippet that checks a user to see if they have 1 or the other of the servers default assigned nicks. in this case "guest" and "anon". these nicks are assigned if you do not choose a nick. they usually have numbers after them so people can see they are different users. for example Guest3890 , Anon5687 , Guest4567
if the user has one or the other of these assigned nicks it will message them simply in channel to change their nick and tells them how to do it.
i have not assigned a channel for the script but can be added to make it channel specific by adding a name after the "hash" symbol. eg #drama
the other item here is the inclusion of the OP symbol @
that tell this snippet to only work if the bot or script this has gone on has that level of rank in the channel.
this snippet is made to go into mIRC's remotes folder. found by pressing ALT + R and clicking on remotes. once remotes is open, if the page is blank, then copy and paste. if it is already occupied with a snippet, then click the File button and select new, before copy and pasting the below code in its full into the box and clicking ok.
the only other point is that this was made and tested on the UnrealIRCd server
<^> Remember.. this is ONLY a demo and should not be used as an idea to post scripts in this format in the snippets area <^>
; this line below is the start command. in this case an on join. it will only work if you/bot have op status.
; it is set to trigger in any room as we have not told it a particular channel after the hash sign
on @*:JOIN:#: {
; this next line is our checking to see if the nick is a server assigned guest nick.
; if it is it will message the user in channel to change nick and tell them how to do it
if (*guest* iswm $nick) {
msg $chan $nick please alter your nick by typing /nick <your nick here> (eg) /nick thomas
}
; this line is a second checker. we are checking to see if the other server assigned nick anon is there.
; if it is then we repeat the message to the nick on how to change the nick
elseif (*anon* iswm $nick) {
msg $chan $nick please alter your nick by typing /nick <your nick here> (eg) /nick Freddy
}
}
; at the end of the script we have made sure that we have closed all brackets and there we have it.