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.

Auto Op + Invite Problem - SOLVED

General support and discussion of Eggdrop bots.
Post Reply
S
Sbarkeri
Voice
Posts: 15
Joined: Tue Aug 11, 2009 12:01 am

Auto Op + Invite Problem - SOLVED

Post by Sbarkeri »

Hi,

I recently setup my channel so that all the Ops have a user on my eggdrop and all have the flags +ao with a select few having +m too. However the problem is that once an op gets deoped by another op the bot will not give him the op back unless he parts the channel. Is there anyway that the bot will instantly give the user the op back as soon as someone takes it away, the only way I want someone to lose op is if I or another master removes it via the partyline.

Also another little issue, to get invited to a channel I have to type

Code: Select all

/msg BOT INVITE PASSWORD #CHANNEL
However I want the bot to auto recognise the user by their hostname so that they do not have to enter a password, for example

Code: Select all

/MSG BOT INVITE #CHANNEL
Thanks in advance,
Steve

P.S. What is the minimum flag required for a user to use INVITE, I know for the QuakeNet for it was +k (known) however that does not exist on eggdrop so it leaves me a little confused.
Last edited by Sbarkeri on Tue Dec 29, 2009 3:49 am, edited 1 time in total.
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Re: Auto Op + Invite Problem

Post by blake »

Sbarkeri wrote:Hi,

I recently setup my channel so that all the Ops have a user on my eggdrop and all have the flags +ao with a select few having +m too. However the problem is that once an op gets deoped by another op the bot will not give him the op back unless he parts the channel. Is there anyway that the bot will instantly give the user the op back as soon as someone takes it away, the only way I want someone to lose op is if I or another master removes it via the partyline.

Also another little issue, to get invited to a channel I have to type

Code: Select all

/msg BOT INVITE PASSWORD #CHANNEL
However I want the bot to auto recognise the user by their hostname so that they do not have to enter a password, for example

Code: Select all

/MSG BOT INVITE #CHANNEL
Thanks in advance,
Steve

P.S. What is the minimum flag required for a user to use INVITE, I know for the QuakeNet for it was +k (known) however that does not exist on eggdrop so it leaves me a little confused.

Code: Select all

bind msg ao|ao opme cmd:opme
bind msg ao|ao invite cmd:invite

proc cmd:opme {nick uhost hand arg} { 
  set chan [lrange [split $arg] 1 end]  
  putserv "mode $chan +o $nick"  
} 

proc cmd:invite {nick uhost hand arg} {
  set chan [lindex [split $arg] 0]  
  set username [lrange [split $arg] 1 end]  
  putserv "INVITE $chan $username"
} 






User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

This allows anyone as long as they are a valid user ("in" eggdrop's userfile) to use /msg <botnick> invite <#channel>

Code: Select all

 catch {unbind msg o|o invite *msg:invite}
 bind msg -|- invite msg:invite2

 proc msg:invite2 {nick host hand text} {
  if {([validuser $hand]) && (![matchattr $hand +kdrq])} {
   if {[llength [split $text]] != 0} {
    set chan [lindex [split $text] 0]
     if {([validchan $chan]) && ([botonchan $chan]) && (![matchattr $hand |+kdrq $chan]) && (![onchan $nick $chan])} {
      putserv "INVITE $nick $chan"
      return 1
     }
   }
  }
 }

 putlog "loaded invite2.tcl"
 return
It also checks for bad flags like +k (auto-kick) and +d (auto-deop) :D so it wont allow people that are banned to invite them selfs in to the channel.
S
Sbarkeri
Voice
Posts: 15
Joined: Tue Aug 11, 2009 12:01 am

Post by Sbarkeri »

TCL_no_TK wrote:This allows anyone as long as they are a valid user ("in" eggdrop's userfile) to use /msg <botnick> invite <#channel>

Code: Select all

 catch {unbind msg o|o invite *msg:invite}
 bind msg -|- invite msg:invite2

 proc msg:invite2 {nick host hand text} {
  if {([validuser $hand]) && (![matchattr $hand +kdrq])} {
   if {[llength [split $text]] != 0} {
    set chan [lindex [split $text] 0]
     if {([validchan $chan]) && ([botonchan $chan]) && (![matchattr $hand |+kdrq $chan]) && (![onchan $nick $chan])} {
      putserv "INVITE $nick $chan"
      return 1
     }
   }
  }
 }

 putlog "loaded invite2.tcl"
 return
It also checks for bad flags like +k (auto-kick) and +d (auto-deop) :D so it wont allow people that are banned to invite them selfs in to the channel.
Just tried to use that script however I kept getting this error in the telnet

Code: Select all

[04:05] Tcl error [msg:invite2]: wrong # args: should be "matchattr handle flags                    ?channel?"
Any idea? :shock:
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

I`ve tried this seems to work fine for me i`ve just removed

Code: Select all

putlog "loaded invite2.tcl"
 return
and placed it in an existing tcl script
S
Sbarkeri
Voice
Posts: 15
Joined: Tue Aug 11, 2009 12:01 am

Post by Sbarkeri »

blake wrote:I`ve tried this seems to work fine for me i`ve just removed

Code: Select all

putlog "loaded invite2.tcl"
 return
and placed it in an existing tcl script
Thanks, worked a treat when I removed the putlog... etc. :D
Post Reply