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.

2 easy questions!!

Old posts that have not been replied to for several years.
Locked
O
OnFire
Voice
Posts: 23
Joined: Tue Oct 01, 2002 1:51 pm

2 easy questions!!

Post by OnFire »

Hi

I'm making an eggdrop bot, and I'd like to know how to script 2 things. They're both really simple but I can't work out how to do them! :(

1) How can I make my bot op itself every time it joins a channel?

2) I want to make a command that works like this:

When someone types !wibble <type>, my bot says to the channel:

/me gives <nick> a <type> Wibble

How can I do this? It's the argument part I can't work out!

Thanks for any help
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

1. For that to work u the network it's on has to have some kind of authserv/nickserv thingie. When the bot joins just mak it send a login-command to the service.
2.

Code: Select all

bind pub - !wibble do_tha_wibble
proc do_tha_wibble {nick host hand chan} {
  putserv "PRIVMSG $chan :\001ACTION gives $nick a $text wibble"
}
Elen sila lúmenn' omentielvo
s
spyda
Halfop
Posts: 64
Joined: Mon Aug 12, 2002 2:22 am
Location: Australia

LIttle Problem

Post by spyda »

Papillon

Code:

bind pub - !wibble do_tha_wibble
proc do_tha_wibble {nick host hand chan} {
putserv "PRIVMSG $chan :\001ACTION gives $nick a $text wibble"
}
Sorry just see a little problem with the coding! I am not sure if it is needed but I know it is not there! it is just the text value in the proc.

Code: Select all

bind pub - !wibble do_tha_wibble 
proc do_tha_wibble {nick host hand chan text} { 
  putserv "PRIVMSG $chan :\001ACTION gives $nick a $text wibble" 
}
------------
ThePope
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

lol
oops :oops:
thx for pointing it out :D
Elen sila lúmenn' omentielvo
O
OnFire
Voice
Posts: 23
Joined: Tue Oct 01, 2002 1:51 pm

Post by OnFire »

Thanks very much!

The bot's on openprojects, so to op the bot I need to msg ChanServ with 'op #wibble'. How can I do this when the bot comes onto the channel??

(I'm a very new TCLer! :lol: )
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

there is no specific bind which executes when the bot joins the channel, but there is a bind when it comes to the server. I suggest u take a look at the tcl-commands.doc under the /doc dir on your eggdrop. Look at bind evnt - .......
Elen sila lúmenn' omentielvo
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

bind join WILL fire when bot joins a channel.
So, you can utilise that...
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
O
OnFire
Voice
Posts: 23
Joined: Tue Oct 01, 2002 1:51 pm

Post by OnFire »

I've made this bind and proc, but the bot says:
<Weebl> [00:01] Tcl error in script for 'need-op':
<Weebl> [00:01] invalid command name "wantop"
There isn't wantop anywhere in the script...

The script is:

Code: Select all

bind evnt - connect-server need_op
proc need_op {nick host hand chan text} {
putserv "PRIVMSG NickServ :identify vikerora"
putserv "PRIVMSG ChanServ :op #wibble"
}
Any help would be appreciated...
Locked