]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-login.c
Implement IRC commands SERVICE, SERVLIST, and SQUERY as dummy functions
[ngircd-alex.git] / src / ngircd / irc-login.c
index dd436192caa888c395572b91ea47d2aa10e30921..e94b62fe00e35d01789e9382bfc533d4d0fd15d6 100644 (file)
@@ -393,6 +393,30 @@ IRC_USER( CLIENT *Client, REQUEST *Req )
 } /* IRC_USER */
 
 
+/**
+ * Service registration.
+ * ngIRCd does not support services at the moment, so this function is a
+ * dummy that returns ERR_ERRONEUSNICKNAME on each call.
+ */
+GLOBAL bool
+IRC_SERVICE(CLIENT *Client, REQUEST *Req)
+{
+       assert(Client != NULL);
+       assert(Req != NULL);
+
+       if (Client_Type(Client) != CLIENT_GOTPASS)
+               return IRC_WriteStrClient(Client, ERR_ALREADYREGISTRED_MSG,
+                                         Client_ID(Client));
+
+       if (Req->argc != 6)
+               return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
+                                         Client_ID(Client), Req->command);
+
+       return IRC_WriteStrClient(Client, ERR_ERRONEUSNICKNAME_MSG,
+                                 Client_ID(Client), Req->argv[0]);
+} /* IRC_SERVICE */
+
+
 GLOBAL bool
 IRC_QUIT( CLIENT *Client, REQUEST *Req )
 {