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 Op + Invite Problem - SOLVED

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


Joined: 11 Aug 2009
Posts: 15

PostPosted: Thu Dec 24, 2009 12:13 am    Post subject: Auto Op + Invite Problem - SOLVED Reply with quote

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


Joined: 23 Feb 2009
Posts: 201

PostPosted: Thu Dec 24, 2009 8:06 am    Post subject: Re: Auto Op + Invite Problem Reply with quote

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
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Thu Dec 24, 2009 3:01 pm    Post subject: Reply with quote

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) Very Happy so it wont allow people that are banned to invite them selfs in to the channel.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Sbarkeri
Voice


Joined: 11 Aug 2009
Posts: 15

PostPosted: Fri Dec 25, 2009 12:09 am    Post subject: Reply with quote

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) Very Happy 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? Shocked
Back to top
View user's profile Send private message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Fri Dec 25, 2009 10:36 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sbarkeri
Voice


Joined: 11 Aug 2009
Posts: 15

PostPosted: Fri Dec 25, 2009 12:17 pm    Post subject: Reply with quote

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. Very Happy
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