egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

On deop Msg to me

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Mon Mar 17, 2008 12:34 pm    Post subject: On deop Msg to me Reply with quote

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
View user's profile Send private message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Mon Mar 17, 2008 3:38 pm    Post subject: Reply with quote

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. Confused

tueb
_________________
#Quiz.de @ irc.GameSurge.net
JavaChat
Back to top
View user's profile Send private message Visit poster's website
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Mar 17, 2008 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Tue Mar 18, 2008 5:52 am    Post subject: Reply with quote

Thank you very much guys Very Happy awesome both scripts works fine Smile thanks
Back to top
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Wed Mar 19, 2008 8:32 am    Post subject: Reply with quote

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
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Wed Mar 19, 2008 9:53 pm    Post subject: Reply with quote

I hope someone see my problem i've tested yesterday 8hours
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Mar 19, 2008 10:12 pm    Post subject: Reply with quote

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. Smile

*** 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... Crying or Very sad
Back to top
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Thu Mar 20, 2008 11:04 am    Post subject: Reply with quote

Well it works thanks to all for help'ing me Smile
Back to top
View user's profile Send private message
Danik
Halfop


Joined: 15 Jun 2008
Posts: 49
Location: Moldova

PostPosted: Thu Sep 11, 2008 4:35 pm    Post subject: Reply with quote

I have this kind of error
[23:33] Tcl error [check:deop]: invalid command name "б═"
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber