if StrBuf_ServGetln() is called in a loop, its return value has to be checked for...
[citadel.git] / webcit / roomops.c
index 5c076b0c9c1a7e4969f0e95f7eda2c11f41cb4cf..2052066dc9eaf837e4b9f3cbb8df7dbe8c529ce7 100644 (file)
@@ -854,7 +854,8 @@ void do_invt_kick(void)
                        if ((StrLength(User) > 0) && (Kick))
                        {
                                serv_printf("KICK %s", ChrPtr(User));
-                               StrBuf_ServGetln(Buf);
+                               if (StrBuf_ServGetln(Buf) < 0)
+                                       break;
                                if (GetServerStatus(Buf, NULL) != 2) {
                                        StrBufCutLeft(Buf, 4);
                                        AppendImportantMessage(SKEY(Buf));
@@ -870,7 +871,8 @@ void do_invt_kick(void)
                        else if ((StrLength(User) > 0) && (Invite))
                        {
                                serv_printf("INVT %s", ChrPtr(User));
-                               StrBuf_ServGetln(Buf);
+                               if (StrBuf_ServGetln(Buf) < 0)
+                                       break;
                                if (GetServerStatus(Buf, NULL) != 2) {
                                        StrBufCutLeft(Buf, 4);
                                        AppendImportantMessage(SKEY(Buf));