putlog "Loading rgreet EP" # Bindings bind join - * join:greet bind msgm - "+greet" msgm:turn_on bind msgm - "-greet" msgm:turn_off bind msgm - "usage" msgm:usage # Channel set setting(greet) 1 set setting(channel) "#elitepings" # Procedures proc notice { nick message } { putserv "NOTICE $nick :$message" } proc msgm:turn_on { nick host hand text } { # Loading global variables global setting # Confirm to user! notice $nick "Turning greeting ON!" # Setting... set setting(greet) 1 } proc msgm:turn_off { nick host hand text } { # Loading global variables global setting # Confirm to user! notice $nick "Turning greeting OFF!" # Setting... set setting(greet) 0 } proc join:greet { nick host hand chan } { # Loading variables global setting # Checking for setting to be 1 or 0. if {$setting(greet) != 1} { return 1; } # Checking if the joined channel is the setted channel! if {$chan != $setting(channel)} { return 1; } # Checking if the bot is on the channel! if {[botonchan $setting(channel)] != 1} { return 1; } # The greeting message, jou can change this, place here # your message! notice $nick "0,1[12,1» 0,112,10,1Welcome $nick to ElitePings, Please 8type @commands 0to get started. 12,1 «0,1]" } proc msgm:usage { nick host hand text } { global botnick notice $nick "Setting up rsh-greet(v0.1):" notice $nick " Command line: /msg $botnick +greet (This turns the script ON!)" notice $nick " Command line: /msg $botnick -greet (This turns the script OFF!)" } # EOF