| View previous topic :: View next topic |
| Author |
Message |
reddy Voice
Joined: 26 Nov 2006 Posts: 5
|
Posted: Sun Nov 26, 2006 12:30 pm Post subject: How to join an invite channel? |
|
|
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 |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Nov 26, 2006 12:41 pm Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
reddy Voice
Joined: 26 Nov 2006 Posts: 5
|
Posted: Sun Nov 26, 2006 1:05 pm Post subject: |
|
|
| 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
| Quote: |
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
| Quote: |
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 |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Nov 26, 2006 1:14 pm Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
reddy Voice
Joined: 26 Nov 2006 Posts: 5
|
Posted: Sun Nov 26, 2006 2:01 pm Post subject: |
|
|
| Thanks! Will do, i've book marked this, so ill keep replying to it! |
|
| Back to top |
|
 |
|