This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

bot greet itself?

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

bot greet itself?

Post by cache »

trying to get a greet script of bot greeting itself when it joins room and no one elses joins. I trid $botnick in some but no luck. any one got one?
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Code: Select all

proc join:greet_self {nick host handle channel} {
 if {([isbotnick $nick])} {
  set bot_chaninfo [getchaninfo $handle $channel]
   set bot_globalinfo [getuser $handle INFO]
    if {($bot_globalinfo != "")} {
     puthelp "PRIVMSG $channel :\[$nick\] $bot_globalinfo"
      return
    }
    if {($bot_chaninfo != "")} {
     puthelp "PRIVMSG $channel :\[$nick\] $bot_chaninfo"
      return
    }
 }
}

bind join - "* *" join:greet_self
Not tested, just add the bot to its own userfile with +bot and then .chinfo <botnick> [greet] for all channels, or for channel specific just do .chinfo <botnick> [#chnanel] [greet]. Not sure if eggdrop's default greet system displays global info lines if one is presant and ignores what everys set for the users greet for the given channel. :roll: probably only displays it if there isn't one for the given channel *sigh* :arrow: hope it works anyway. :)
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

I'm not sure that a join bind (or any bind for that matter) will be triggered by the bot itself, even with a user record of the bot added to itself. Think you may need to do a raw binding on something like end of receiving names list (366).
Post Reply