changed Makefile; build all commands as an own file
[NeonServV5.git] / cmd_neonserv_peek.c
index a6ae3121606466e511cc7d655a299507eb1a1dcb..67244037f9ca045a071b491d3abcb6dbb1a718f8 100644 (file)
@@ -1,4 +1,6 @@
 
+#include "cmd_neonserv.h"
+
 /*
 * no parameters
 */
@@ -10,7 +12,7 @@ struct neonserv_cmd_peek_cache {
     struct UserNode *user;
 };
 
-static CMD_BIND(neonserv_cmd_peek) {
+CMD_BIND(neonserv_cmd_peek) {
     struct neonserv_cmd_peek_cache *cache = malloc(sizeof(*cache));
     if (!cache) {
         perror("malloc() failed");
@@ -32,7 +34,8 @@ static void neonserv_cmd_peek_async1(struct ClientSocket *client, struct ClientS
     reply(textclient, user, "NS_PEEK_HEADER", chan->name);
     reply(textclient, user, "NS_PEEK_TOPIC", chan->topic);
     char tmpStr[MAXLEN];
-    reply(textclient, user, "NS_PEEK_MODES", getModeString(chan->modes, tmpStr));
+    getModeString(chan->modes, tmpStr);
+    reply(textclient, user, "NS_PEEK_MODES", tmpStr);
     struct ChanUser *chanuser;
     int op_count = 0, voice_count = 0, normal_count = 0, invi_count = 0;
     for(chanuser = getChannelUsers(chan, NULL); chanuser; chanuser = getChannelUsers(chan, chanuser)) {