/*******************************************************************************
***************************** Goto Commands ***********************************
******************************************************************************/
+
+void dotskip(void) {
+ smart_goto(sbstr("room"));
+}
+
void dotgoto(void) {
if (!havebstr("room")) {
readloop(readnew, eUseDefault);
StrBuf *Buf;
static long ls = (-1L);
long err = 0;
+ int room_name_supplied = 0;
+ int is_baseroom = 0;
/* store ungoto information */
- if (StrLength(gname) > 0)
+ if (StrLength(gname) > 0) {
+ room_name_supplied = 1;
+ }
+ if (room_name_supplied) {
strcpy(WCC->ugname, ChrPtr(WCC->CurRoom.name));
+ if (!strcasecmp(ChrPtr(gname), "_BASEROOM_")) {
+ is_baseroom = 1;
+ }
+ }
WCC->uglsn = ls;
Buf = NewStrBuf();
/* move to the new room */
- if (StrLength(gname) > 0)
+ if (room_name_supplied) {
serv_printf("GOTO %s", ChrPtr(gname));
- else /* or just refresh the current state... */
+ }
+ else {
+ /* or just refresh the current state... */
serv_printf("GOTO 00000000000000000000");
+ }
StrBuf_ServGetln(Buf);
if (GetServerStatus(Buf, &err) != 2) {
serv_puts("GOTO _BASEROOM_");
FlushFolder(&WCC->CurRoom);
ParseGoto(&WCC->CurRoom, Buf);
- if (StrLength(gname) > 0)
- {
+ if (room_name_supplied) {
remove_march(WCC->CurRoom.name);
- if (!strcasecmp(ChrPtr(gname), "_BASEROOM_"))
+ if (is_baseroom) {
remove_march(gname);
+ }
}
FreeStrBuf(&Buf);
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)
{
-/**
- * \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];
-/**
- * \brief Perform changes to a room's network configuration
+/*
+ * Perform changes to a room's network configuration
*/
void netedit(void) {
FILE *fp;