1 Add accountid field 'b' to /who, we don't allow selecting by it though.
3 diff -r 92f6cb6562e2 doc/readme.who
4 --- a/doc/readme.who Tue Jan 13 22:17:04 2009 +0000
5 +++ b/doc/readme.who Thu Feb 12 15:06:28 2009 +0100
7 t : Include the querytype in the reply
8 u : Include userID with eventual ~
9 a : Include account name
10 + b : Include account ID [snircd 1.4.0]
11 o : Include oplevel (shows 999 to users without ops in the channel)
13 And the ,<querytype> final option can be used to specify what you want the
15 :"source" 354 "target" ["querytype"] ["channel"] ["user"]
16 ["IP"] ["host"] ["server"] ["nick"]
17 ["flags"] ["hops"] ["idle"] ["account"]
18 + ["accountID"] ["oplevel"]
21 Where only the fields specified in the %fields options are present.
22 diff -r 92f6cb6562e2 include/whocmds.h
23 --- a/include/whocmds.h Tue Jan 13 22:17:04 2009 +0000
24 +++ b/include/whocmds.h Thu Feb 12 15:06:28 2009 +0100
26 #define WHO_FIELD_IDL 1024 /**< Show idle time. */
27 #define WHO_FIELD_ACC 2048 /**< Show account name. */
28 #define WHO_FIELD_OPL 4096 /**< Show oplevel. */
29 +#define WHO_FIELD_AID 8192 /**< Show account id. */
31 /** Default fields for /WHO */
32 #define WHO_FIELD_DEF ( WHO_FIELD_NIC | WHO_FIELD_UID | WHO_FIELD_HOS | WHO_FIELD_SER )
33 diff -r 92f6cb6562e2 ircd/m_who.c
34 --- a/ircd/m_who.c Tue Jan 13 22:17:04 2009 +0000
35 +++ b/ircd/m_who.c Thu Feb 12 15:06:28 2009 +0100
42 + fields |= WHO_FIELD_AID;
46 fields |= WHO_FIELD_CHA;
47 diff -r 92f6cb6562e2 ircd/whocmds.c
48 --- a/ircd/whocmds.c Tue Jan 13 22:17:04 2009 +0000
49 +++ b/ircd/whocmds.c Thu Feb 12 15:06:28 2009 +0100
54 + if (fields & WHO_FIELD_AID)
57 + if(*(cli_user(acptr)->account)) /* char account[X] can't be NULL */
58 + p1 += ircd_snprintf(0, p1, 22, "%lu", cli_user(acptr)->acc_id);
63 if (fields & WHO_FIELD_OPL)
65 if (!chan || !IsChanOp(chan))