| View previous topic :: View next topic |
| Author |
Message |
CyberWar Voice
Joined: 04 Feb 2008 Posts: 36
|
Posted: Mon Mar 17, 2008 12:34 pm Post subject: On deop Msg to me |
|
|
Hi all
i have now some script about pub and binds and msg/notice. but how looks a script e.g.
Bot was deoped by Nick
Bot send a msg to me: I'm deoped on $channel please op me
i think it's very easy? but how i do that?
when someone set the bot -o he write a msg in my query |
|
| Back to top |
|
 |
tueb Halfop
Joined: 04 Oct 2007 Posts: 76 Location: #quiz.de @ irc.gamesurge.net
|
Posted: Mon Mar 17, 2008 3:38 pm Post subject: |
|
|
maybe this will work:
| Code: |
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."
}
}
|
there's most likely a better way than "$text == '-o $botnick'". unfortunately i don't know it.
tueb _________________ #Quiz.de @ irc.GameSurge.net
JavaChat |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Mar 17, 2008 3:55 pm Post subject: |
|
|
| Code: | # --> 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."
}
}
} |
|
|
| Back to top |
|
 |
CyberWar Voice
Joined: 04 Feb 2008 Posts: 36
|
Posted: Tue Mar 18, 2008 5:52 am Post subject: |
|
|
Thank you very much guys awesome both scripts works fine thanks |
|
| Back to top |
|
 |
CyberWar Voice
Joined: 04 Feb 2008 Posts: 36
|
Posted: Wed Mar 19, 2008 8:32 am Post subject: |
|
|
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
| Code: | 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."
}
}
} |
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.
If i write in the partyline: | Quote: | | .msg Helibot .opme #bla | then it works
Whats the Problem? i have one error in the partyline: | Code: | [13:25] Tcl error [log:mode]: wrong # args: should be "log:mode nick uhost hand channel text"
|
|
|
| Back to top |
|
 |
CyberWar Voice
Joined: 04 Feb 2008 Posts: 36
|
Posted: Wed Mar 19, 2008 9:53 pm Post subject: |
|
|
| I hope someone see my problem i've tested yesterday 8hours |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Mar 19, 2008 10:12 pm Post subject: |
|
|
| 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
| Code: | 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."
}
}
} |
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. |
it's this line: if {[isop $n $chan]} {
That tells the bot don't even bother asking an unopped person in that channel for ops, even if they are on the list. Read below this part of the original script (you shortened it without realizing what it said). | Code: | # 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."
} |
| CyberWar wrote: | If i write in the partyline: | Quote: | | .msg Helibot .opme #bla | then it works
Whats the Problem? |
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: | i have one error in the partyline: | Code: | [13:25] Tcl error [log:mode]: wrong # args: should be "log:mode nick uhost hand channel text"
|
| 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.
*** Note: It's also acceptable to KEEP comments in the script, they act as notes to help the next time you make modifications. Others wishing to (and yourself later when you forget what parts of your code do..heh) can learn from your commented code and understand it based upon the comments explaining its expected behavior. When I see people strip them completely it leaves tears in my eyes...  |
|
| Back to top |
|
 |
CyberWar Voice
Joined: 04 Feb 2008 Posts: 36
|
Posted: Thu Mar 20, 2008 11:04 am Post subject: |
|
|
Well it works thanks to all for help'ing me  |
|
| Back to top |
|
 |
Danik Halfop
Joined: 15 Jun 2008 Posts: 49 Location: Moldova
|
Posted: Thu Sep 11, 2008 4:35 pm Post subject: |
|
|
I have this kind of error
[23:33] Tcl error [check:deop]: invalid command name "б═" |
|
| Back to top |
|
 |
|