egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bot to msg during channel join

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
panasonic
Voice


Joined: 15 Sep 2007
Posts: 25

PostPosted: Wed Dec 05, 2007 2:18 pm    Post subject: Bot to msg during channel join Reply with quote

hi!

i am trying to make my bot to notify user that the bot is now Online and the user can start using the bot commands

i have tried with this script but it wont works

Code:
bind join - #channel bot:joined

proc bot:joined {nick uhost hand chan} {
 if {[isbotnick user1 user2 user3] && [string equal -nocase #channel $chan]} {
  utimer 15 [ putserv "PRIVMSG user1 user2 user3: "I am online now. My commands are available by typing !commands at #channel."]
 }
}

putlog "Bot ready script - loaded"


but the user did not receive any message while the bot joining the channel now Sad

the purpose of this script is just to notify user1, user2 and user3 that my bot is online and they can start using the bot
i have another script for !commands

any advice is appeciated
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Dec 05, 2007 7:42 pm    Post subject: Re: Bot to msg during channel join Reply with quote

panasonic wrote:
hi!

i am trying to make my bot to notify user that the bot is now Online and the user can start using the bot commands

i have tried with this script but it wont works


Try this script...
Code:
variable yourchannel "#channel"
variable nickalerts "nick1 nick2 nick3"

bind join - $::yourchannel bot:joined

proc bot:joined {nick uhost hand chan} {
  if {[isbotnick $nick]} {
    foreach n [split $::nickalerts] {
      putserv "PRIVMSG $n :I am online now. My commands are available by typing !commands on $::yourchannel."
    }
  }
}


edit: fixed; as per user's observation noted below. Wink


Last edited by speechles on Thu Dec 06, 2007 7:58 pm; edited 3 times in total
Back to top
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Thu Dec 06, 2007 8:17 am    Post subject: Re: Bot to msg during channel join Reply with quote

speechles wrote:
Code:
::$yourchannel
...
::$nickalerts

make that
Code:
$::varname

_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber