| View previous topic :: View next topic |
| Author |
Message |
Sbarkeri Voice
Joined: 11 Aug 2009 Posts: 15
|
Posted: Thu Dec 24, 2009 12:13 am Post subject: Auto Op + Invite Problem - SOLVED |
|
|
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: | | /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: | | /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 |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Thu Dec 24, 2009 8:06 am Post subject: Re: Auto Op + Invite Problem |
|
|
| 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: | | /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: | | /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: | 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"
}
|
_________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Thu Dec 24, 2009 3:01 pm Post subject: |
|
|
This allows anyone as long as they are a valid user ("in" eggdrop's userfile) to use /msg <botnick> invite <#channel>
| Code: | 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) so it wont allow people that are banned to invite them selfs in to the channel. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
Sbarkeri Voice
Joined: 11 Aug 2009 Posts: 15
|
Posted: Fri Dec 25, 2009 12:09 am Post subject: |
|
|
| 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: | 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) 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: |
[04:05] Tcl error [msg:invite2]: wrong # args: should be "matchattr handle flags ?channel?"
|
Any idea?  |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Fri Dec 25, 2009 10:36 am Post subject: |
|
|
I`ve tried this seems to work fine for me i`ve just removed
| Code: | putlog "loaded invite2.tcl"
return |
and placed it in an existing tcl script _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
Sbarkeri Voice
Joined: 11 Aug 2009 Posts: 15
|
Posted: Fri Dec 25, 2009 12:17 pm Post subject: |
|
|
| blake wrote: | I`ve tried this seems to work fine for me i`ve just removed
| Code: | putlog "loaded invite2.tcl"
return |
and placed it in an existing tcl script |
Thanks, worked a treat when I removed the putlog... etc.  |
|
| Back to top |
|
 |
|