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 

AOP with authcheck
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri May 23, 2008 2:27 am    Post subject: Reply with quote

Code:
setudef flag aop

set aop(channel) "#channel"
set aop(rawid) "678"
bind time -|- "* * * * *" scantime

proc scantime {minute hour day month year} {
   global aop
   bind RAW -|- {354} raw354
   if {[validchan $aop(channel)]} {
      if {[channel get $aop(channel) aop]} {
         putserv "WHO $aop(channel) n%cnahuft,$aop(rawid)"
      }
   }
}
proc raw354 {s r a} {
   global aop
   set a [join [split $a]]
   regexp {(.*?) (.*?) (.*?) (.*?) (.*?) (.*?) (.*?) (.*?)} $a match bnick rawid chan ident host nick flags auth
   set v "*+*"
   set o "*@*"
   if {[string equal -nocase $rawid $aop(rawid)]} {
      if {![string match $auth 0] > 0} {
         if {[channel get $chan aop] || [channel get [string tolower $chan] aop]} {
            if {[string match "$o" "$flags"] == 0} {
               pushmode $chan +o $nick
            }
         }   
      }     
   }         
}           
putlog "ircu AOP script loaded"
Happier now?
By the way, quakenet uses undernet's ircd (just in case you didn't know that).
Back to top
View user's profile Send private message
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Fri May 23, 2008 11:24 am    Post subject: Reply with quote

ahh Ok. no did not knew that. Thank u very much for ure help.

Well hope u will not kill me but is it possible to implement this part ?

Code:
 bind PUB o !aop aop_pub

   proc aop_pub {nick uhost hand chan arg} {
      set s [lindex $arg 0]
      switch $s {
         on {
            if {[channel get $chan aop]} {
               putserv "NOTICE $nick :Auto op is already \002on\002 for $chan"
            } else {
               channel set $chan +aop
               putserv "NOTICE $nick :Auto op is now \002on\002 for $chan"
            }
         }
         off { channel set $chan -aop; putserv "NOTICE $nick :Auto op is now \002off\002 for $chan" }

         default {
            if {[channel get $chan aop]} {
               putserv "NOTICE $nick :Auto op is \002on\002 for $chan"
            } else {
               putserv "NOTICE $nick :Auto op is \002off\002 for $chan"
            }
         }
      }
   }


Maybe to let the user edit the trigger like

Quote:
set op(trigger) "\."


Thank u
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri May 23, 2008 11:53 am    Post subject: Reply with quote

of course that's possible Smile
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri May 23, 2008 12:04 pm    Post subject: Reply with quote

Code:

setudef flag aop

set aop(channel) "#channel"
set aop(rawid) "678"
set aop(cmd) "!aop"

bind time -|- "* * * * *" scantime
bind PUB o $aop(cmd) aop_pub

proc scantime {minute hour day month year} {
   global aop
   bind RAW -|- {354} raw354
   if {[validchan $aop(channel)]} {
      if {[channel get $aop(channel) aop]} {
         putserv "WHO $aop(channel) n%cnahuft,$aop(rawid)"
      }
   }
}

proc raw354 {s r a} {
   global aop
   set a [join [split $a]]
   regexp {(.*?) (.*?) (.*?) (.*?) (.*?) (.*?) (.*?) (.*?)} $a match bnick rawid chan ident host nick flags auth
   set v "*+*"
   set o "*@*"
   if {[string equal -nocase $rawid $aop(rawid)]} {
      if {![string match $auth 0] > 0} {
         if {[channel get $chan aop] || [channel get [string tolower $chan] aop]} {
            if {[string match "$o" "$flags"] == 0} {
               pushmode $chan +o $nick
            }
         }   
      }     
   }         
}

proc aop_pub {n u h c t} {
   set s [lindex $t 0]
   switch $s {
      on {
         if {[channel get $c aop]} {
            putserv "NOTICE $n :Auto op is already \002on\002 for $c"
         } else {
            channel set $c +aop
            putserv "NOTICE $n :Auto op is now \002on\002 for $c"
         }
      }
      off {channel set $c -aop; putserv "NOTICE $n :Auto op is now \002off\002 for $c"}
      default {
         if {[channel get $c aop]} {
            putserv "NOTICE $n :Auto op is \002on\002 for $c"
         } else {
            putserv "NOTICE $n :Auto op is \002off\002 for $c"
         }
      }
   }
}
putlog "ircu AOP script loaded"
Back to top
View user's profile Send private message
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Fri May 23, 2008 2:15 pm    Post subject: Reply with quote

Well i meant !aop #channel on/off status

that somebody can enter in chan !aop #xyz on

and it ops also Users that have +d Flag on q. Means the Bot ops and q deops and this the whole time.

i´ve tried this
Quote:
if {[matchattr [nick2hand $nick] d|d $chan] == 0} {
but its not working
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri May 23, 2008 11:33 pm    Post subject: Reply with quote

jonlar wrote:
Well i meant !aop #channel on/off status

that somebody can enter in chan !aop #xyz on

and it ops also Users that have +d Flag on q. Means the Bot ops and q deops and this the whole time.

i´ve tried this
Quote:
if {[matchattr [nick2hand $nick] d|d $chan] == 0} {
but its not working
Is "q" your bot? If you are talking about the quakenet services, then you'll have to set that user +d on your bot also.
Back to top
View user's profile Send private message
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Sat May 24, 2008 10:14 am    Post subject: Reply with quote

Yep its q net. Sorry.

Well if i dont want to set +d on my bot, just checking on Q it has to be look like
Quote:

if {[matchattr [nick2hand $nick] +d $chan] == 0} {

??

and what i meant with the trigger is...

Code:
setudef flag aop
bind pub n "!aop" pub:aop
bind join - * join:aop


Well i dont know how o bind the rest in the code. maybe

Code:
setudef flag aop
bind pub n "!aop" pub:aop
bind join - * join:aop


bind time -|- "* * * * *" scantime
bind PUB o $aop(cmd) aop_pub

proc scantime {minute hour day month year} {
   global aop
   bind RAW -|- {354} raw354
   if {[validchan $aop(channel)]} {
      if {[channel get $aop(channel) aop]} {
         putserv "WHO $aop(channel) n%cnahuft,$aop(rawid)"
      }
   }
}

proc raw354 {s r a} {
   global aop
   set a [join [split $a]]
   regexp {(.*?) (.*?) (.*?) (.*?) (.*?) (.*?) (.*?) (.*?)} $a match bnick rawid chan ident host nick flags auth
   set v "*+*"
   set o "*@*"
   if {[string equal -nocase $rawid $aop(rawid)]} {
      if {![string match $auth 0] > 0} {
         if {[channel get $chan aop] || [channel get [string tolower $chan] aop]} {
            if {[string match "$o" "$flags"] == 0} {
               pushmode $chan +o $nick
            }
         }   
      }     
   }         
}

proc aop_pub {n u h c t} {
   set s [lindex $t 0]
   switch $s {
      on {
         if {[channel get $c aop]} {
            putserv "NOTICE $n :Auto op is already \002on\002 for $c"
         } else {
            channel set $c +aop
            putserv "NOTICE $n :Auto op is now \002on\002 for $c"
         }
      }
      off {channel set $c -aop; putserv "NOTICE $n :Auto op is now \002off\002 for $c"}
      default {
         if {[channel get $c aop]} {
            putserv "NOTICE $n :Auto op is \002on\002 for $c"
         } else {
            putserv "NOTICE $n :Auto op is \002off\002 for $c"
         }
      }
   }
}
putlog "ircu AOP script loaded"
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sun May 25, 2008 5:37 pm    Post subject: Reply with quote

matchattr is only for internal eggdrop flag checking.

it has NOTHING to do with Q.
Instead you should be smart enough to just not op all users on your channel.
Back to top
View user's profile Send private message
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Mon May 26, 2008 7:28 am    Post subject: Reply with quote

Well smart or not. thats why i want the script for the "smartness"
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 -> Scripting Help All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 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