ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
- (c)2001-2011 Alexander Barton and Contributors.
+ (c)2001-2012 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
mode since description
a 0.3.0 User is away.
+ B 20 User is flagged as a "bot".
c 17 IRC operator wants to receive connect/disconnect NOTICEs.
C 19 Only users that share a channel are allowed to send messages.
i 0.0.1 User is "invisible".
#endif
/** Supported user modes. */
-#define USERMODES "acCiorRswx"
+#define USERMODES "aBcCiorRswx"
/** Supported channel modes. */
#define CHANMODES "beiIklmMnoOPrRstvz"
Client_ID(from), Client_ID(c)))
return DISCONNECTED;
+ /* IRC-Bot? */
+ if (Client_HasMode(c, 'B') &&
+ !IRC_WriteStrClient(from, RPL_WHOISBOT_MSG,
+ Client_ID(from), Client_ID(c)))
+ return DISCONNECTED;
+
/* Connected using SSL? */
if (Conn_UsesSSL(Client_Conn(c)) &&
!IRC_WriteStrClient(from, RPL_WHOISSSL_MSG, Client_ID(from),
ERR_NOPRIVILEGES_MSG,
Client_ID(Origin));
break;
+ case 'B': /* Bot */
+ if (Client_HasMode(Client, 'r'))
+ ok = IRC_WriteStrClient(Origin,
+ ERR_RESTRICTED_MSG,
+ Client_ID(Origin));
+ else
+ x[0] = 'B';
+ break;
case 'c': /* Receive connect notices
* (only settable by IRC operators!) */
if (!set || Client_Type(Client) == CLIENT_SERVER
#define RPL_NOTOPIC_MSG "331 %s %s :No topic is set"
#define RPL_TOPIC_MSG "332 %s %s :%s"
#define RPL_TOPICSETBY_MSG "333 %s %s %s %u"
+#define RPL_WHOISBOT_MSG "335 %s %s :is a IRC Bot"
#define RPL_INVITING_MSG "341 %s %s %s%s"
#define RPL_INVITELIST_MSG "346 %s %s %s"
#define RPL_ENDOFINVITELIST_MSG "347 %s %s :End of channel invite list"