Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/commands.c @ 454:d647b92e541f
MUC: Disallow room names with a '/'
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 26 Sep 2005 22:41:39 +0200 |
parents | dfd9c62b3a39 |
children | 1d8f5b3a5f2b |
comparison
equal
deleted
inserted
replaced
453:39e173645f9c | 454:d647b92e541f |
---|---|
933 return; | 933 return; |
934 } | 934 } |
935 for (; *arg && *arg == ' '; arg++) | 935 for (; *arg && *arg == ' '; arg++) |
936 ; | 936 ; |
937 | 937 |
938 if (strchr(arg, '/')) { | |
939 scr_LogPrint(LPRINT_NORMAL, "Invalid room name"); | |
940 return; | |
941 } | |
942 | |
938 roomname = g_strdup(arg); | 943 roomname = g_strdup(arg); |
939 nick = strchr(roomname, ' '); | 944 nick = strchr(roomname, ' '); |
940 if (!nick) { | 945 if (!nick) { |
941 scr_LogPrint(LPRINT_NORMAL, "Missing parameter (nickname)"); | 946 scr_LogPrint(LPRINT_NORMAL, "Missing parameter (nickname)"); |
942 g_free(roomname); | 947 g_free(roomname); |