This snippet is for a channel greet! Replace rules with the rules u want it to say other wise remove the text rules
ON *:JOIN:#:/msg $chan Hi $nick welcome to $chan !!! The time is now $time
on *:TEXT:!rules:#:/msg $chan rules-over-here
ooops my bad napa ^^. am not too well atm and struggling for thought. got the most part right. forgot bout the wildcard. just never passed the thought of someone typing it midsentance and assumed it would have been a straight forward up front command..
one other thought though whilst i am here is the addition of one of my own snippets to assist in stopping any one idiot flooding you off the server.
This is my own submitted snippet found at http://www.hawkee.com/snippet/3874/ i have edited it to work with the !rules trigger as per napa\'s correction to my bad.
on *:TEXT:!rules:#:{
if ( %test. [ $+ [ $nick ] ] == $null ) {
set %test. [ $+ [ $nick ] ] 1
.msg $nick
.timer 1 10 unset %test. [ $+ [ $nick ] ]
}
}
the timer here is set for 10 secs there and will stop a nick from activating the command more than once during that time period before it resets and becomes available for the nick to usde again. also to note is the use there of the .msg that delivers a private message to the nick to keep channel chat clear.
Cheiron said:
there is an error i can see there though on the trigger word part. you are missing a couple of *\'s. should look like this.
on :TEXT:!rules*:#: { /msg $chan
why would he want to make the !rules a wildcard for?
on *:text:!rules:#:{ code here }
will work just fine cuz if he did it the way you said it would trigger in the mid of a sentence like ex: \"oh command is !rules so type that.\" =/
you could always edit it to include colours using the Ctrl + k function to buff it up a little. also maybe add a delay to the greet.. or change the message entire channel to something like .notice $nick which is the notice event (silent too there i point out as it is .notice and not /notice)or /msg $nick which makes it nick specific as opposed channel. other option is the .msg $nick which opens a pm with the nick on join.
there is an error i can see there though on the trigger word part. you are missing a couple of *\'s. should look like this.
on :TEXT:!rules*:#: { /msg $chan
other than that, it is a simple snippet. it works and it is a start on the ladder. welcome to hawkee L :)
Seriously, please come up with something that doesn\'t get posted every week and is this basic.
I do not mean to be an asswipe here, please continue to post snippets and feel free to do so aswell. It\'s only that 2 lines of code isn\'t really that much to deliver unless it\'s unique or in some other way advanced/not seen so often. It might be fun to post them but try to be more unique and make them more advanced rather than just throwing up basic scripts provided in /help.
This is just words from another scripter who was probably more ignorant than you are when I first started. And I haven\'t improved too much :P Please forgive me if I sound harsh but I had to take out my bad night in some way.