Well this is not a hard thing to do.
What you can do is make a script, to first check users on your opped channel, match them with users on the other chan, then add them to a list, and using pushmode or putserv whatever you can op them.
Now the thing is you might want to trigger this with a pub bind, as there is not other manual way to do it. Or you can trigger it on +o of #channel1 if you like as well.
*** For *** this to work, the bot MUST be on both channels, and it must be opped on #channel2, so it can retrieve the user lists of both channels, compare them and make a seperate list to op the users.
I am not sure, but something like this should definately work:
Code: Select all
### Settings ###
#This will be the channel where the opped users will be detected on.
set chan1 "#opchannel"
#This will be the channel to op the people on.
set chan2 "#chanforop"
### Don't edit anything below this! ###
bind pub n !opscan scan:ops
proc scan:ops {nick uhost hand chan text} {
global botnick chan1 chan2
if {(![validchan $chan1]) || (![validchan $chan2])} { return 0 }
if {(![string equal -nocase $chan $chan1]) || (![string equal -nocase $chan $chan2])} { return 0 }
putserv "PRIVMSG $chan1 :Scanning..."; set oplist [list]
foreach user [chanlist $chan1] {
if {([onchan $user $chan1]) && ([onchan $user $chan2])} {
lappend oplist $user
}
}
putserv "PRIVMSG $chan1 :Scanning completed."
if {([llength $oplist] >= 1) && ([botisop $chan2])} {
putserv "PRIVMSG $chan1 :Opping all users on $chan1 to $chan2."
foreach person $oplist {
pushmode $chan2 +o $person
}
flushmode $chan2
putserv "PRIVMSG $chan1 :Nick(s) [join $oplist {, }] has/have been successfully opped on $chan2.
}
return 0
}
So this will work with anyone (mainly the bot owner) with flag "n", types
!opscan on any one of the two channels. Then the bot will detect opped users from channel1 and op those users on channel2.
I haven't tested it though, but I think it will work
no doubt!
Give this script a try and let me know