Eggdrop TCL
Results 1 to 3 of 3

Thread: Eggdrop TCL

  1. #1
    er0k
    Guest

    Eggdrop TCL

    Does anyone know the TCL syntax for getting the bot to kick a user? so far ive tried:
    Code:
    bind pub - !kick kick
    
    proc kick {nick uhost handle chan args} {
            putserv "PRIVMSG $chan /kick $nick :\001ACTION die \001"
    
            return 0
    }
    But all the bot does is return to the channel:

    botname: /kick

    instead of kicking the user upon request of !kick

    ...

    I dont understand why not, it seems like it should work.. any input would be cool ..

  2. #2
    Banned
    Join Date
    May 2003
    Posts
    210
    bind pub - !kick kick

    proc kick {nick uhost handle chan args} {
    putserv "PRIVMSG $chan /kick $nick :\001ACTION die \001"

    return 0
    }

    "PRIVMSG $chan" is RFC1459 speak for "send <this> to <channel>", hence the bot messaging the channel with /kick etc etc. remove this bit and it should work fine and dandy, eg;

    bind pub - !kick kick

    proc kick {nick uhost handle chan args} {
    putserv "KICK $chan $nick :\001ACTION die \001"

    return 0
    }

    (the / is not required on KICK because you are seding the command directly to the server - the slash is utilised by common clients. also note that i added a $chan before $nick, in accordance with RFC1459.)

    cheers,

    Abtronic

  3. #3
    er0k
    Guest
    danke, im new to Tcl, thanks for da help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •