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.

How to join an invite channel?

General support and discussion of Eggdrop bots.
Post Reply
r
reddy
Voice
Posts: 5
Joined: Sun Nov 26, 2006 11:56 am

How to join an invite channel?

Post by reddy »

Hey, i have a bot that needs to join private channels, via a Q auth and self invite.

I have the Q auth, how can i go about getting my bot into the private channels?

the irc commands would be /msg q invite #channel then /j channel

is it in the partyline or bot config or should i do a script? Im new to TCL and bots n stuff, but im having fun learning!!

Thanks

reddy
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Either use "bind need" or check the need-invite channel setting;
Either allows you to trigger a piece of tcl-code to be executed when your eggdrop recieves the need-invite errorcode.

Might very well be a few such scripts in the Tcl Archive. If not, should'nt be too hard to implement, and makes nice practise in tcl coding
NML_375
r
reddy
Voice
Posts: 5
Joined: Sun Nov 26, 2006 11:56 am

Post by reddy »

nml375 wrote:Either use "bind need" or check the need-invite channel setting;
Either allows you to trigger a piece of tcl-code to be executed when your eggdrop recieves the need-invite errorcode.

Might very well be a few such scripts in the Tcl Archive. If not, should'nt be too hard to implement, and makes nice practise in tcl coding
I've searched the archive, and its heavy duty stuff! Im getting errors when i try run the taylored scripts - Its a bit overkill imo... there has to be an easier way to do it - heres a small snippet of a script i got which is WAAAY too much detail
bind need - "% invite" need:invite

proc need:invite {chan type} {
global botnick needinvitetype needinvitechans
if {($needinvitetype == 1) && ([lsearch -exact [split [string tolower $needinvitechans]] [string tolower $chan]] != -1)} { needinvite:chans $chan $type }
if {($needinvitetype == 2)} { needinvite:chans $chan $type }
if {($needinvitetype != 1) && ($needinvitetype != 2) || ($needinvitetype == 0)} { return 0 }
}

I know this does something totally different, but can it be done like
bind pub - !joinInvite pub_joinInvite
proc pub_joinInvite {nick host hand chan lang text} {
putserv "PRIVMSG Q Invite #CHANNEL"
putserv "join #CHANNEL"
}
Im only coding TCL a day now, so as much detail as possible would be great
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Actually, should you combine those two scripts, you'd have pretty much all you need. (Or well, the privmsg in the second script is slightly flawed, as you need to prepend the message with a ":", just as with any privmsg)

Although this would fit better in "Script Help"; here we go..
First scriptlet shows you how to create the binding that'll trigger the script and how the proc (function) will be called.
Second one shows what you actually want that proc todo.
Try and combine them..

Rome was'nt built in a day, so keep going :)
NML_375
r
reddy
Voice
Posts: 5
Joined: Sun Nov 26, 2006 11:56 am

Post by reddy »

Thanks! Will do, i've book marked this, so ill keep replying to it!
Post Reply