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.

Help with my join on invite and msg on join script.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
R
Red_Rooste5
Voice
Posts: 37
Joined: Sat Oct 21, 2006 7:43 am

Help with my join on invite and msg on join script.

Post by Red_Rooste5 »

Code: Select all

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?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Try:

Code: Select all

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
R
Red_Rooste5
Voice
Posts: 37
Joined: Sat Oct 21, 2006 7:43 am

Post by Red_Rooste5 »

I tried that one but it doesn't work still... :\
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
R
Red_Rooste5
Voice
Posts: 37
Joined: Sat Oct 21, 2006 7:43 am

Post by Red_Rooste5 »

I removed that but it still doesn't work.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

The [validchan] command won't work unless the channel has already been added, btw..
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Tcl-commands.doc:
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
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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: Select all

bind raw - INVITE invite:join
Other than that, Tosser^^'s proc should work just fine (assuming default-chanset includes -inactive)
NML_375
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Odd that the post I made which included the solution was deleted :roll:
R
Red_Rooste5
Voice
Posts: 37
Joined: Sat Oct 21, 2006 7:43 am

Post by Red_Rooste5 »

Err... Couldn't anyone write that script everyone's talking about?
I don't get what I should add or remove :P
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

metroid wrote:Odd that the post I made which included the solution was deleted :roll:
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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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
s
smash
Halfop
Posts: 45
Joined: Mon Jul 31, 2006 12:33 pm

Post by smash »

I tryed it and it works!

is it posable to do ./part botnick #channel as well ?
Post Reply