/*******************************************************************************
***************************** Goto Commands ***********************************
******************************************************************************/
+
+void dotskip(void) {
+ smart_goto(sbstr("room"));
+}
+
void dotgoto(void) {
if (!havebstr("room")) {
readloop(readnew, eUseDefault);
memset(room, 0, sizeof(folder));
room->name = pBuf;
- StrBufExtract_NextToken(room->name, Line, &Pos, '|'); // WC->CurRoom->name
+ StrBufExtract_NextToken(room->name, Line, &Pos, '|');
room->nNewMessages = StrBufExtractNext_long(Line, &Pos, '|');
if (room->nNewMessages > 0)
room->ShowInfo = StrBufExtractNext_long(Line, &Pos, '|');
- room->QRFlags = StrBufExtractNext_long(Line, &Pos, '|'); //CurRoom->QRFlags
+ room->QRFlags = StrBufExtractNext_long(Line, &Pos, '|');
DBG_QR(room->QRFlags);
room->HighestRead = StrBufExtractNext_long(Line, &Pos, '|');
room->LastMessageRead = StrBufExtractNext_long(Line, &Pos, '|');
- room->is_inbox = StrBufExtractNext_long(Line, &Pos, '|'); // is_mailbox
+ room->is_inbox = StrBufExtractNext_long(Line, &Pos, '|');
flag = StrBufExtractNext_long(Line, &Pos, '|');
if (WCC->is_aide || flag) {
room->UsersNewMAilboxMessages = StrBufExtractNext_long(Line, &Pos, '|');
- room->floorid = StrBufExtractNext_int(Line, &Pos, '|'); // wc_floor
+ room->floorid = StrBufExtractNext_int(Line, &Pos, '|');
- room->view = StrBufExtractNext_long(Line, &Pos, '|'); // CurRoom->view
+ room->view = StrBufExtractNext_long(Line, &Pos, '|');
- room->defview = StrBufExtractNext_long(Line, &Pos, '|'); // CurRoom->defview
+ room->defview = StrBufExtractNext_long(Line, &Pos, '|');
flag = StrBufExtractNext_long(Line, &Pos, '|');
if (flag)
- room->RAFlags |= UA_ISTRASH; // wc_is_trash
+ room->RAFlags |= UA_ISTRASH;
- room->QRFlags2 = StrBufExtractNext_long(Line, &Pos, '|'); // CurRoom->QRFlags2
+ room->QRFlags2 = StrBufExtractNext_long(Line, &Pos, '|');
DBG_QR2(room->QRFlags2);
/* find out, whether we are in a sub-room */
room->Floor = (const Floor*) vFloor;
}
-/**
- * \brief Delete the current room
+/*
+ * Delete the current room
*/
void delete_room(void)
{
}
}
-/**
- * \brief zap a room
+/*
+ * zap a room
*/
void zap(void)
{
SetCurrentRoomFlags (&WCC->CurRoom);
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
}
if (!havebstr("ok_button")) {
strcpy(WC->ImportantMessage,
_("Cancelled. Changes were not saved."));
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
return;
}
if (GetCurrentRoomFlags (&WCC->CurRoom) == 0)
if (succ1 + succ2 == 0)
AppendImportantMessage (_("Your changes have been saved."), -1);
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
return;
}
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));
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));
}
}
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
}
WCC->CurRoom.view = er_view;
if ( (WCC != NULL) && ( (WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) ) {
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
} else {
smart_goto(WCC->CurRoom.name);
}
-/**
- * \brief Set the message expire policy for this room and/or floor
+/*
+ * Set the message expire policy for this room and/or floor
*/
void set_room_policy(void) {
char buf[SIZ];
if (!havebstr("ok_button")) {
strcpy(WC->ImportantMessage,
_("Cancelled. Changes were not saved."));
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
return;
}
strcat(WC->ImportantMessage, &buf[4]);
}
ReloadCurrentRoom();
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
}
-/**
- * \brief Perform changes to a room's network configuration
+/*
+ * Perform changes to a room's network configuration
*/
void netedit(void) {
FILE *fp;
strcat(line, bstr("suffix"));
}
else {
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
return;
}
fp = tmpfile();
if (fp == NULL) {
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
return;
}
fclose(fp);
AppendImportantMessage(SRV_STATUS_MSG(Line));
FreeStrBuf(&Line);
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
return;
}
if (GetServerStatus(Line, NULL) != 4) {
fclose(fp);
AppendImportantMessage(SRV_STATUS_MSG(Line));
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
FreeStrBuf(&Line);
return;
}
FlushIgnetCfgs(&WC->CurRoom);
FreeStrBuf(&Line);
- http_transmit_thing(ChrPtr(do_template("room_edit", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("room_edit")), 0);
}
/*
*/
void knrooms(void)
{
+ DeleteHash(&WC->Rooms);
output_headers(1, 1, 1, 0, 0, 0);
- do_template("knrooms", NULL);
+ do_template("knrooms");
wDumpContent(1);
}
AppendImportantMessage (SKEY(Buf));
FlushRoomlist();
- http_transmit_thing(ChrPtr(do_template("floors", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("floors")), 0);
FreeStrBuf(&Buf);
}
}
AppendImportantMessage (SKEY(Buf));
FlushRoomlist();
- http_transmit_thing(ChrPtr(do_template("floors", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("floors")), 0);
FreeStrBuf(&Buf);
}
StrBufCutLeft(Buf, 4);
AppendImportantMessage (SKEY(Buf));
- http_transmit_thing(ChrPtr(do_template("floors", NULL)), 0);
+ http_transmit_thing(ChrPtr(do_template("floors")), 0);
FreeStrBuf(&Buf);
}