mirror of
https://github.com/anope/anope.git
synced 2026-07-03 05:53:12 +02:00
Catch the exception from /os session view invalidip
This commit is contained in:
@@ -198,7 +198,13 @@ class CommandOSSession : public Command
|
||||
void DoView(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
Anope::string param = params[1];
|
||||
Session *session = session_service->FindSession(param);
|
||||
Session *session = NULL;
|
||||
|
||||
try
|
||||
{
|
||||
session = session_service->FindSession(param);
|
||||
}
|
||||
catch (const SocketException &) { }
|
||||
|
||||
if (!session)
|
||||
source.Reply(_("\002%s\002 not found on session list."), param.c_str());
|
||||
|
||||
Reference in New Issue
Block a user