egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with my join on invite and msg on join script.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Red_Rooste5
Voice


Joined: 21 Oct 2006
Posts: 37

PostPosted: Fri Nov 03, 2006 6:10 am    Post subject: Help with my join on invite and msg on join script. Reply with quote

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
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Nov 03, 2006 6:31 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Red_Rooste5
Voice


Joined: 21 Oct 2006
Posts: 37

PostPosted: Fri Nov 03, 2006 11:24 am    Post subject: Reply with quote

I tried that one but it doesn't work still... :\
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Fri Nov 03, 2006 12:23 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Red_Rooste5
Voice


Joined: 21 Oct 2006
Posts: 37

PostPosted: Thu Nov 09, 2006 10:20 am    Post subject: Reply with quote

I removed that but it still doesn't work.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Nov 09, 2006 11:27 am    Post subject: Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Nov 09, 2006 11:30 am    Post subject: Reply with quote

The [validchan] command won't work unless the channel has already been added, btw..
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Nov 09, 2006 1:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Nov 09, 2006 2:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Thu Nov 09, 2006 2:46 pm    Post subject: Reply with quote

Odd that the post I made which included the solution was deleted Rolling Eyes
Back to top
View user's profile Send private message
Red_Rooste5
Voice


Joined: 21 Oct 2006
Posts: 37

PostPosted: Thu Nov 09, 2006 2:53 pm    Post subject: Reply with quote

Err... Couldn't anyone write that script everyone's talking about?
I don't get what I should add or remove Razz
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Nov 09, 2006 3:57 pm    Post subject: Reply with quote

metroid wrote:
Odd that the post I made which included the solution was deleted Rolling Eyes

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
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Nov 09, 2006 3:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Nov 09, 2006 7:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
smash
Halfop


Joined: 31 Jul 2006
Posts: 45

PostPosted: Thu Nov 09, 2006 8:24 pm    Post subject: Reply with quote

I tryed it and it works!

is it posable to do ./part botnick #channel as well ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber