Page 1 of 1

Tokens and doc/technical/token.txt

Posted: Fri Feb 25, 2005 7:10 am
by webfox
I was digging around, trying to find any documentation on the token list used by Unreal. After having discovered the token.txt file I noticed it missing some key elements - Ping, Pong, Nick....

So, off to the source. Inside msg.h I found a more complete token list, though it seems there are tokens listed in token.txt that aren't in msg.h - like token BX for SVSJOIN. How odd.

For now I'm tossing aside the idea of using tokens in the script I'm modifing (POE::Component::IRC::Service::Unreal32 was something I needed and didn't exist, so I'm adjusting ::P10 and ::Hybrid's modules to cover it), for lack of certainty on which tokens to follow. I figured I'd at least inquire as to why the two lists are different, or perhaps nudge someone to bring the two back in sync... :)

Posted: Fri Feb 25, 2005 7:12 pm
by Ron2K
If you believe that it's doc/technical/token.txt that's at fault, then submit a patch for this file to the bugtracker (http://bugs.unrealircd.org).

Posted: Sat Feb 26, 2005 4:29 am
by w00t
They are out of date (/synch)

For example, you will notice that msg.h contains some definitions for commands like HASH, and things like a token for kline (err, aren't they local only?)

We tried to document them for WinSE, you may be able to grab a copy of the file somewhere in our CVS, I can't remember the filename offhand. If aquanight sees this thread, he'll be able to tell you.

Posted: Sat Feb 26, 2005 4:36 am
by Syzop

Code: Select all

$ grep TOK_ include/msg.h  src/modules -r|grep define|awk -F ':' '{ print $2 }'|awk '{ print substr($2,5) " " $3 }'|sort -u|column -t

ADDLINE     "z"
ADDMOTD     "AQ"
ADDOMOTD    "AR"
ADMIN       "@"
ADMINCHAT   "x"
AKILL       "V"
AWAY        "6"
BOTMOTD     "BF"
BOTSERV     "BS"
CHANSERV    "j"
CHATOPS     "p"
CHGHOST     "AL"
CHGIDENT    "AZ"
CHGNAME     "BK"
CLOSE       "Q"
CONNECT     "7"
CREDITS     "AJ"
CYCLE       "BP"
DALINFO     "w"
DCCDENY     "BI"
DIE         "R"
DNS         "T"
DUMMY       "DU"
EOS         "ES"
ERROR       "5"
GLINE       "}"
GLOBOPS     "]"
GNOTICE     "Z"
GOPER       "["
HASH        "S"
HELP        "4"
HELPSERV    "s"
HTM         "BH"
IDENTIFY    "g"
INFO        "/"
INFOSERV    "BO"
INVITE      "*"
ISON        "K"
JOIN        "C"
KICK        "H"
KILL        "."
KLINE       "W"
KNOCK       "AI"
LAG         "AF"
LICENSE     "AK"
LINKS       "0"
LIST        "("
LOCOPS      "^"
LUSERS      "E"
MAP         "u"
MEMOSERV    "l"
MKPASSWD    "y"
MODE        "G"
MODULE      "BQ"
MOTD        "F"
NACHAT      "AC"
NAMES       "?"
NETINFO     "AO"
NICK        "&"
NICKSERV    "i"
NONE        ""
NOTICE      "B"
OPER        ";"
OPERMOTD    "AV"
OPERSERV    "k"
PART        "D"
PASS        "<"
PING        "8"
PONG        "9"
POST        "BN"
PRIVATE     "!"
PROTOCTL    "_"
QUIT        ","
RAKILL      "Y"
REHASH      "O"
REMGLINE    "BG"
RESTART     "P"
RPING       "AM"
RPONG       "AN"
RULES       "t"
SAJOIN      "AX"
SAMODE      "o"
SAPART      "AY"
SDESC       "AG"
SENDSNO     "Ss"
SENDUMODE   "AP"
SERVER      "'"
SERVICE     "I"
SERVICES    "m"
SETHOST     "AA"
SETIDENT    "AD"
SETNAME     "AE"
SHUN        "BL"
SILENCE     "U"
SJOIN       "~"
SMO         "AU"
SQLINE      "c"
SQUIT       "-"
STATS       "2"
STATSERV    "AH"
SUMMON      "1"
SVS2MODE    "v"
SVS2SNO     "BW"
SVSFLINE    "BC"
SVSJOIN     "BX"
SVSKILL     "h"
SVSLUSERS   "BU"
SVSMODE     "n"
SVSMOTD     "AS"
SVSNICK     "e"
SVSNLINE    "BR"
SVSNOOP     "f"
SVSO        "BB"
SVSPART     "BT"
SVSSILENCE  "Bs"
SVSSNO      "BV"
SVSWATCH    "Bw"
SWHOIS      "BA"
TEMPSHUN    "Tz"
TIME        ">"
TKL         "BD"
TOPIC       ")"
TRACE       "b"
TSCTL       "AW"
UMODE2      "|"
UNDCCDENY   "BJ"
UNKLINE     "X"
UNSQLINE    "d"
UNZLINE     "r"
USER        "%"
USERHOST    "J"
USERS       "3"
VERSION     "+"
VHOST       "BE"
WALLOPS     "="
WATCH       "`"
WHO         "\""
WHOIS       "#"
WHOWAS      "$"
ZLINE       "q"
cmdline is wonderful really

(true, any ancient entries are still there, along with tokens of commands that are never sent over the network, but if you need the token of a command, you can find it here :p)

Posted: Sat Feb 26, 2005 4:46 am
by w00t
Few questions on that list, maybe here isnt the place to ask, but i dont know for sure yet :p

Why does ADDLINE have a token? Is it ever sent server->server?
Same for DIE, RFC says it's never sent server->server.
What is GOPER?
What is HASH?
Why is KLINE sent server->server?
Same for MAP, LIST (all servers should know all other elements)
What is PRIVATE?

[oops, just saw sys's note]

Posted: Sat Feb 26, 2005 7:44 am
by webfox
yeah, I threw a new file at the bugtracker, then saw syz's note too :P

Though, my solution for generating the file wasn't quite as elegant as that oneliner.