This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
raven
Voice
Posts: 12 Joined: Mon Aug 08, 2011 9:06 am
Post
by raven » Wed Mar 01, 2023 1:39 pm
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?
simo
Revered One
Posts: 1107 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Thu Mar 02, 2023 11:03 am
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
raven
Voice
Posts: 12 Joined: Mon Aug 08, 2011 9:06 am
Post
by raven » Thu Mar 02, 2023 1:40 pm
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)
simo
Revered One
Posts: 1107 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Thu Mar 02, 2023 4:01 pm
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
raven
Voice
Posts: 12 Joined: Mon Aug 08, 2011 9:06 am
Post
by raven » Sat Mar 04, 2023 6:31 am
I know very little to nothing about scripting. irssi has a script for it, so it "should" be doable using /whois or RAW?
CrazyCat
Revered One
Posts: 1304 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Sat Mar 04, 2023 9:40 am
Give a link to the irssi script so we can understand exactly your expectations.
raven
Voice
Posts: 12 Joined: Mon Aug 08, 2011 9:06 am
Post
by raven » Sat Mar 04, 2023 10:36 am
simo
Revered One
Posts: 1107 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Mar 04, 2023 11:21 am
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: Select all
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 }
}
}
raven
Voice
Posts: 12 Joined: Mon Aug 08, 2011 9:06 am
Post
by raven » Sat Mar 04, 2023 11:35 am
Nope, that did nothing. I am Server Admin, if that makes a difference? Different RAW numerical?
simo
Revered One
Posts: 1107 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Mar 04, 2023 11:40 am
perhaps i could connect to your server and do some checks myselve if you are ok with that if so pm me the details
raven
Voice
Posts: 12 Joined: Mon Aug 08, 2011 9:06 am
Post
by raven » Sat Mar 04, 2023 11:43 am
Sure, we can be found on irc.sosdg.org
simo
Revered One
Posts: 1107 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Mar 04, 2023 12:04 pm
edit basic working code :
Code: Select all
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
}
}