View previous topic :: View next topic |
Author |
Message |
raven Voice
Joined: 08 Aug 2011 Posts: 12
|
Posted: Wed Mar 01, 2023 1:39 pm Post subject: OperIt and auto op for IRCop |
|
|
Hi. I Co-admin a smaller network, and would like a script that auto-ops any IRCop that joins, and that ops on trigger "operit". Anyone around that can help me out? |
|
Back to top |
|
 |
simo Revered One
Joined: 22 Mar 2015 Posts: 1051
|
Posted: Thu Mar 02, 2023 11:03 am Post subject: |
|
|
you can use oper / superadmin option for that if you are using anope services on your IRC network or in the case u use inspircd there is a module you could use for that |
|
Back to top |
|
 |
raven Voice
Joined: 08 Aug 2011 Posts: 12
|
Posted: Thu Mar 02, 2023 1:40 pm Post subject: |
|
|
simo wrote: | you can use oper / superadmin option for that if you are using anope services on your IRC network or in the case u use inspircd there is a module you could use for that |
Perhaps, but I still want that as a script if possible (We run ratbox btw) |
|
Back to top |
|
 |
simo Revered One
Joined: 22 Mar 2015 Posts: 1051
|
Posted: Thu Mar 02, 2023 4:01 pm Post subject: |
|
|
how would eggdrop know who is an ircop and who isnt ?
if there is a way to find out you could use that in a tcl to retreive |
|
Back to top |
|
 |
raven Voice
Joined: 08 Aug 2011 Posts: 12
|
Posted: Sat Mar 04, 2023 6:31 am Post subject: |
|
|
I know very little to nothing about scripting. irssi has a script for it, so it "should" be doable using /whois or RAW? |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1145 Location: France
|
Posted: Sat Mar 04, 2023 9:40 am Post subject: |
|
|
Give a link to the irssi script so we can understand exactly your expectations. _________________ Eggdrop community - French IRC network |
|
Back to top |
|
 |
raven Voice
Joined: 08 Aug 2011 Posts: 12
|
|
Back to top |
|
 |
simo Revered One
Joined: 22 Mar 2015 Posts: 1051
|
Posted: Sat Mar 04, 2023 11:21 am Post subject: |
|
|
from what i have read and checking raw numerics for ircoper i came to find its raw numeric 313 that retreives ircops status in a whois
i came up with this see if it works as i dont run ratbox myselve else i could have tested myselve but from what ive read raw numeric 313 is RFC1459
see if this works out for you
Code: |
bind raw - 313 check:isircop
bind join - * join:checkisircop
proc join:checkisircop {nick uhost hand chan} {
if {[botisop $chan] && ![isbotnick $nick] && ![validuser [nick2hand $nick]]} {
putserv "WHOIS $nick"
}
}
proc check:isircop {from keyword args} {
global verifieduser
if {![string match $verifieduser $args]} {return}
set nick [lindex [split $args] 1]
if {[validuser [nick2hand $nick]]} return
foreach chan [channels] {
if {![onchan $nick $chan] || [isop $nick $chan] || [isvoice $nick $chan]} continue
if {[botisop $chan]} { pushmode $chan +v $nick }
}
}
|
|
|
Back to top |
|
 |
raven Voice
Joined: 08 Aug 2011 Posts: 12
|
Posted: Sat Mar 04, 2023 11:35 am Post subject: |
|
|
Nope, that did nothing. I am Server Admin, if that makes a difference? Different RAW numerical? |
|
Back to top |
|
 |
simo Revered One
Joined: 22 Mar 2015 Posts: 1051
|
Posted: Sat Mar 04, 2023 11:40 am Post subject: |
|
|
perhaps i could connect to your server and do some checks myselve if you are ok with that if so pm me the details |
|
Back to top |
|
 |
raven Voice
Joined: 08 Aug 2011 Posts: 12
|
Posted: Sat Mar 04, 2023 11:43 am Post subject: |
|
|
Sure, we can be found on irc.sosdg.org |
|
Back to top |
|
 |
simo Revered One
Joined: 22 Mar 2015 Posts: 1051
|
Posted: Sat Mar 04, 2023 12:04 pm Post subject: |
|
|
edit basic working code :
Code: |
bind raw - 313 check:isircop
bind join - * join:checkisircop
bind pub - operit check:ircop
proc check:ircop {nick uhost hand chan text} {
set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
if {[botisop $chan] && ![isbotnick $nick]} {
putserv "WHOIS $nick"
}
}
proc join:checkisircop {nick uhost hand chan} {
if {[botisop $chan] && ![isbotnick $nick]} {
putserv "WHOIS $nick"
}
}
proc check:isircop {from keyword args} {
set nick [lindex [split $args] 1]
foreach chan [channels] {
if {![onchan $nick $chan] || ![botisop $chan] || [isop $nick $chan]} continue
pushmode $chan +o $nick
}
}
|
|
|
Back to top |
|
 |
|