You can also use setchaninfo and +greet, which are both internal/core eggdrop commands. It would be much easier than adding a script just to greet a single user.
There is a script for infoline
here with commands explained.
For the script to be like you asked, where it triggers ONLY when your BOT joins, then use something similar to what was posted above.
Code: Select all
bind join - * pub:join
proc pub:join {nick uhost hand chan} {
global botnick
if {($chan == "#psycho") && ([isbotnick $nick])} {
puthelp "PRIVMSG $chan :Welcome $botnick to $chan Channel."
puthelp "PRIVMSG $chan :\0034$botnick is Back\003!!"
} else { puthelp "PRIVMSG $chan :Welcome $nick to $chan Channel."
}
}
You can even make it so you can turn this on|off, using
.chanset #channel +botgreet
Code: Select all
bind join - * pub:join
setudef flag botgreet
proc pub:join {nick uhost hand chan} {
global botnick
if {![channel get $chan botgreet]} {return}
if {($chan == "#psycho") && ([isbotnick $nick])} {
puthelp "PRIVMSG $chan :Welcome $botnick to $chan Channel."
puthelp "PRIVMSG $chan :\0034$botnick is Back\003!!"
} else { puthelp "PRIVMSG $chan :Welcome $nick to $chan Channel."
}
}
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.