eggdrop's CTCP

By Spoofing on Nov 20, 2010

Grabbed from eggdrop source code :P and ported for mIRC bots.

alias traffic {
  signal traffic $1
}
on *:START: {
  ignore -tw *
}
on *:LOGON:*: {
  debug -i logs/traffic.log traffic
}
on *:SIGNAL:traffic: {
  if ($1 == <-) {
    if ($(PRIVMSG & :*) iswm $3-) {
      var %nick = $gettok($mid($2,2),1,33), %address = $gettok($mid($2,2),2,33), %target = $4, %key = $gettok($mid($5-,3,-1),1,32), %arg = $gettok($mid($5-,3,-1),2-,32)
      tokenize 32 %arg
      if (%key == SED) { }
      if (%key == VERSION) ctcpreply %nick %key eggdrop v1.6.20
      if (%key == CLIENTINFO) {
        if ($1 == SED) ctcpreply %nick %key SED contains simple_encrypted_data
        elseif ($1 == VERSION) ctcpreply %nick %key VERSION shows client type, version and environment
        elseif ($1 == CLIENTINFO) ctcpreply %nick %key CLIENTINFO gives information about available CTCP commands
        elseif ($1 == USERINFO) ctcpreply %nick %key USERINFO returns user settable information
        elseif ($1 == ERRMSG) ctcpreply %nick %key ERRMSG returns error messages
        elseif ($1 == FINGER) ctcpreply %nick %key FINGER shows real name, login name and idle time of user
        elseif ($1 == TIME) ctcpreply %nick %key TIME tells you the time on the user's host
        elseif ($1 == ACTION) ctcpreply %nick %key ACTION contains action descriptions for atmosphere
        elseif ($1 == DCC) ctcpreply %nick %key DCC requests a direct_client_connection
        elseif ($1 == UTC) ctcpreply %nick %key UTC substitutes the local timezone
        elseif ($1 == PING) ctcpreply %nick %key PING returns the arguments it receives
        elseif ($1 == ECHO) ctcpreply %nick %key ECHO returns the arguments it receives
        elseif (%arg) ctcpreply %nick ERRMSG CLIENTINFO: $1 is not a valid function
        else ctcpreply %nick %key SED VERSION CLIENTINFO USERINFO ERRMSG FINGER TIME ACTION DCC UTC PING ECHO  :Use CLIENTINFO <COMMAND> to get more specific information
      }
      if (%key == USERINFO) ctcpreply %nick %key eggdrop v1.6.20
      if (%key == ERRMSG) ctcpreply %nick %key
      if (%key == FINGER) ctcpreply %nick %key eggdrop v1.6.20
      if (%key == TIME) ctcpreply %nick %key $time
      if (%key == ACTION) { }
      if (%key == DCC) { }
      if (%key == UTC) { }
      if (%key == PING) ctcpreply %nick %key %arg
      if (%key == ECHO) ctcpreply %nick %key %arg
    }
  }
}
Sign in to comment.
Luna   -  Nov 24, 2010

That's nice.

 Respond  
FordLawnmower   -  Nov 23, 2010

@Spoofing You have been making some cool stuff lately but what is this for? I'm just really curious why you would want to return anything eggdrop related in your ctcp. This could actually get you a ban on some networks if you don't have your client registered as a bot. The opposite of this script(tcl mIRC CTCP) might be useful to avoid problems related to being identified as an eggdrop but I'm confused by this.

 Respond  
Dark|   -  Nov 23, 2010

i remember seeing a ctcp changer in one huge script - and i have this {the verison changer} as eggdrop for my mirc bot ;P

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.