]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-mode.c
Implement an Unreal-like user mode "B" ("Bot mode")
[ngircd-alex.git] / src / ngircd / irc-mode.c
index fa35cdd0f29d7742d92c169f6ce992a56eaa1ca5..9cad32493d84b2ddb55520913b64e6628e0cfc7e 100644 (file)
@@ -229,6 +229,14 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
                                                        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