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 

Auto join on invite

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
matt932
Voice


Joined: 23 Oct 2011
Posts: 1

PostPosted: Sun Oct 23, 2011 11:52 pm    Post subject: Auto join on invite Reply with quote

How can i make eggdrop auto join a channel when its invited to it
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Oct 24, 2011 11:34 am    Post subject: Reply with quote

Hi matt932,
This will require a custom script, as there is no native function for this:

To trigger on the invite, you'll need to use a raw binding, looking for the INVITE keyword.
To make your eggdrop join the channel, you'll need to use the "channel add" command.

A rough (rather unsafe) script would look somewhat like follows. Be adviced this script does no permission-checks whatsoever - You'll probably want to add something to restrict who may use it...
Code:
bind raw - INVITE checkInvites

proc checkInvites {from keyword text} {
  set args [split $text]
  set channel [lindex $args 1]

  channel add $channel
  return 0
}


A version with some safetychecks, though it requires the inviter to have op privileges and be in a channel where your eggdrop can see them before accepting the invite:
Code:
bind raw - INVITE checkInvites

proc checkInvites {from keyword text} {
  set args [split $text]
  set channel [lindex $args 1]
  set handle [nick2hand $from]

  if {$handle == "" || ![matchattr $handle +mno]} {
    return 0
  }

  channel add $channel
  return 0
}

_________________
NML_375, idling at #eggdrop@IrcNET
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 -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
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