Code: Select all
bind mode - *o log:mode
proc log:mode {nick uhost hand channel text} {
global botnick
if {$text == "-o $botnick"} {
putserv "PRIVMSG CyberWar :$nick deoped $botnick on $channel."
}
}
Code: Select all
# --> alertnicks
# nicks to alert bot is deopped and to reop it
# can be 1,2,3 or 50,000 nicks (MUST seperate each by a space)
variable alertnicks "nick1 nick2 etc etc"
bind mode - *-o* check:deop
proc check:deop {nick uhost hand chan mc victim} {
if {[isbotnick $victim]} {
foreach n [split $::alertnicks] {
if {[isop $n $chan]} {
set deopflag 1
# if alertnicks is greater than 5, we use puthelp
# to avoid bot being flooded off irc.
if {[llength [split $::alertnicks]] > 5} {
puthelp "privmsg $n :I \($victim\) have just been deopped in $chan by $nick. Please reop me."
} else {
putserv "privmsg $n :I \($victim\) have just been deopped in $chan by $nick. Please reop me."
}
}
}
# if there is nobody from the alertnicks list
# in the channel with ops, let's not ask them
# for ops, they can't help. let's instead make a
# public channel announcement about it.
if {![info exists deopflag]} {
putserv "privmsg $chan :\[automated message\] $nick has broken the rules on $chan by deopping me. There is \
no one in my list with ops that I can ask to op me. I am making this public message in the hopes \
someone will op me. Thank you."
}
}
}
Code: Select all
variable alertnicks "HeliBot CyberWar"
bind mode - *-o* check:deop
proc check:deop {nick uhost hand chan mc victim} {
if {[isbotnick $victim]} {
foreach n [split $::alertnicks] {
if {[isop $n $chan]} {
set deopflag 1
if {[llength [split $::alertnicks]] > 3} {
puthelp "PRIVMSG $nick :.opme $chan"
} else {
putserv "PRIVMSG $nick :.opme $chan"
}
}
}
if {![info exists deopflag]} {
putserv "privmsg #botsynch :\[automated message\] $nick has broken the rules on $chan by deopping me."
}
}
}
then it works.msg Helibot .opme #bla
Code: Select all
[13:25] Tcl error [log:mode]: wrong # args: should be "log:mode nick uhost hand channel text"
it's this line: if {[isop $n $chan]} {CyberWar wrote:Well this script is awesome speechles
Now i have one question. I will tell u my problem.
The Bot Seen is op in a channel. e.g. #bla
Then if i deop Seen he give me a privmsg in my query: <Seen> .opme #bla
That was my test.
Now we have an another Bot with oline.
If someone deop Seen he dont write to this Bot with oline. why?
Here is my currently Script
Seen write only to me a privmsg i've tested with some another guys on our irc. But the bot write only me not HeliBot or the another test users.Code: Select all
variable alertnicks "HeliBot CyberWar" bind mode - *-o* check:deop proc check:deop {nick uhost hand chan mc victim} { if {[isbotnick $victim]} { foreach n [split $::alertnicks] { if {[isop $n $chan]} { set deopflag 1 if {[llength [split $::alertnicks]] > 3} { puthelp "PRIVMSG $nick :.opme $chan" } else { putserv "PRIVMSG $nick :.opme $chan" } } } if {![info exists deopflag]} { putserv "privmsg #botsynch :\[automated message\] $nick has broken the rules on $chan by deopping me." } } }
Code: Select all
# if there is nobody from the alertnicks list
# in the channel with ops, let's not ask them
# for ops, they can't help. let's instead make a
# public channel announcement about it.
if {![info exists deopflag]} {
putserv "privmsg $chan :\[automated message\] $nick has broken the rules on $chan by deopping me. There is \
no one in my list with ops that I can ask to op me. I am making this public message in the hopes \
someone will op me. Thank you."
}
The problem is the difference between what your doing and what the script can. Your using an direct client connection (dcc) command, while the script uses an internet relayed one (privmsg). If you have commands available to op through that oline'd bot using private message, the script can be adapted for that quite easily.CyberWar wrote:If i write in the partyline:then it works.msg Helibot .opme #bla
Whats the Problem?
That would be tueb's script. That code is expecting an older version of eggdrop. On newer eggdrops you get that error about arguments not matching parameters. Just unload that script. Then op Helibot and your other friends in the alertnicks list and try again.CyberWar wrote:i have one error in the partyline:Code: Select all
[13:25] Tcl error [log:mode]: wrong # args: should be "log:mode nick uhost hand channel text"