| View previous topic :: View next topic |
| Author |
Message |
Red_Rooste5 Voice
Joined: 21 Oct 2006 Posts: 37
|
Posted: Fri Nov 03, 2006 6:10 am Post subject: Help with my join on invite and msg on join script. |
|
|
| Code: | bind raw - *INVITE* invite:join
proc invite:join {from key text} {
add channel [lindex $text 1]
}
bind join - join:msg
proc join:msg {nick uhost hand chan text} {
if ( $nick == BoomBot ) {
putserv "PRIVMSG $chan :BoomBot v1 by Red_Rooste5" }
}
|
It's supposed to join the channel that invited the bot then when it has joined say the PUTSERV message. But it doesn't work. Help? |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Fri Nov 03, 2006 6:31 am Post subject: |
|
|
Try:
| Code: | bind raw - 346 invite:join
bind join - {*} invite:joinmsg
proc invite:join {from key arg} {
if {![validchan [set chan [lindex [split $arg] 1]]] && [llength [channels]] < "20"} {
channel add $chan
}
}
proc invite:joinmsg {nick uhost hand chan} {
if {[isbotnick $nick]} {
putserv "PRIVMSG $chan :BoomBot v1 by Red_Rooste5"
}
} |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
Red_Rooste5 Voice
Joined: 21 Oct 2006 Posts: 37
|
Posted: Fri Nov 03, 2006 11:24 am Post subject: |
|
|
| I tried that one but it doesn't work still... :\ |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Nov 03, 2006 12:23 pm Post subject: |
|
|
I wonder why there is a ! in front of [validchan, try to remove it. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
Red_Rooste5 Voice
Joined: 21 Oct 2006 Posts: 37
|
Posted: Thu Nov 09, 2006 10:20 am Post subject: |
|
|
| I removed that but it still doesn't work. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Thu Nov 09, 2006 11:27 am Post subject: |
|
|
Does it *add* the channel? If so, it works, but presumably when you add a channel, you also have to do:
channel set $text -inactive |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Thu Nov 09, 2006 11:30 am Post subject: |
|
|
| The [validchan] command won't work unless the channel has already been added, btw.. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Nov 09, 2006 1:18 pm Post subject: |
|
|
Tcl-commands.doc:
| Quote: | validchan <channel>
Description: checks if the bot has a channel record for the specified
channel. Note that this does not necessarily mean that the bot is ON
the channel.
Returns: 1 if the channel exists, 0 if not
Module: channels
|
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Nov 09, 2006 2:03 pm Post subject: |
|
|
Err... when was the 346 numeric added? Can't find it in rfc1459 (de-facto irc standard)...
Unless you are using a non-rfc compliant server, the binding should be
| Code: | | bind raw - INVITE invite:join |
Other than that, Tosser^^'s proc should work just fine (assuming default-chanset includes -inactive) _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Thu Nov 09, 2006 2:46 pm Post subject: |
|
|
Odd that the post I made which included the solution was deleted  |
|
| Back to top |
|
 |
Red_Rooste5 Voice
Joined: 21 Oct 2006 Posts: 37
|
Posted: Thu Nov 09, 2006 2:53 pm Post subject: |
|
|
Err... Couldn't anyone write that script everyone's talking about?
I don't get what I should add or remove  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Nov 09, 2006 3:57 pm Post subject: |
|
|
| metroid wrote: | Odd that the post I made which included the solution was deleted  |
Would seem you "flamed" and therefore the post was sent to the Junk Yard. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Nov 09, 2006 3:59 pm Post subject: |
|
|
| metroid wrote: | | It's because you need to bind on raw INVITE not 346. |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Thu Nov 09, 2006 7:33 pm Post subject: |
|
|
| nml375 wrote: | Err... when was the 346 numeric added? Can't find it in rfc1459 (de-facto irc standard)...
|
346 RPL_INVITELIST RFC2812 <channel> <invitemask> An invite mask for the invite mask list
http://www.alien.net.au/irc/irc2numerics.html |
|
| Back to top |
|
 |
smash Halfop
Joined: 31 Jul 2006 Posts: 45
|
Posted: Thu Nov 09, 2006 8:24 pm Post subject: |
|
|
I tryed it and it works!
is it posable to do ./part botnick #channel as well ? |
|
| Back to top |
|
 |
|