From 7ec74eaaa51201a9442465484b95070bd06279a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 28 Feb 2010 19:29:31 +0000 Subject: [PATCH] * add proper error handling to room netconfig loading --- webcit/roomlist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webcit/roomlist.c b/webcit/roomlist.c index 72335f525..493375d73 100644 --- a/webcit/roomlist.c +++ b/webcit/roomlist.c @@ -271,6 +271,7 @@ HashList *GetNetConfigHash(StrBuf *Target, WCTemplputParams *TP) StrBuf *Content; long WantThisOne; long PutTo; + long State; WantThisOne = GetTemplateTokenNumber(Target, TP, 5, 0); if (WantThisOne == 0) @@ -283,7 +284,7 @@ HashList *GetNetConfigHash(StrBuf *Target, WCTemplputParams *TP) Line = NewStrBuf(); Token = NewStrBuf(); StrBuf_ServGetln(Line); - if (GetServerStatus(Line, NULL) == 1) + if (GetServerStatus(Line, &State) == 1) { const char *Pos = NULL; StrBuf_ServGetln(Line); @@ -304,6 +305,10 @@ HashList *GetNetConfigHash(StrBuf *Target, WCTemplputParams *TP) HFreeStrBuf); } } + else if (State == 550) + StrBufAppendBufPlain(WCC->ImportantMsg, + _("Higher access is required to access this function."), -1, 0); + return WCC->CurRoom.IgnetCfgs[WantThisOne]; } -- 2.30.2