| View previous topic :: View next topic |
| Author |
Message |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri May 23, 2008 2:27 am Post subject: |
|
|
| 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 |
|
 |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Fri May 23, 2008 11:24 am Post subject: |
|
|
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 |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri May 23, 2008 11:53 am Post subject: |
|
|
of course that's possible  |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri May 23, 2008 12:04 pm Post subject: |
|
|
| 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 |
|
 |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Fri May 23, 2008 2:15 pm Post subject: |
|
|
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 |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri May 23, 2008 11:33 pm Post subject: |
|
|
| 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 |
|
 |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Sat May 24, 2008 10:14 am Post subject: |
|
|
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 |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sun May 25, 2008 5:37 pm Post subject: |
|
|
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 |
|
 |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Mon May 26, 2008 7:28 am Post subject: |
|
|
| Well smart or not. thats why i want the script for the "smartness" |
|
| Back to top |
|
 |
|