From: wcampbel Date: Thu, 1 Apr 2004 19:39:04 +0000 (+0000) Subject: Fixed a bug with RUN, where if a user was not logged in (playing), the X-Git-Url: https://jfr.im/git/irc/gameservirc.git/commitdiff_plain/bb668fcf666c70130d77a458e7d3d805e1694b70 Fixed a bug with RUN, where if a user was not logged in (playing), the service would core. git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@135 bc333340-6410-0410-a689-9d09f3c113fa --- diff --git a/gameserv/Changes b/gameserv/Changes index b8d0a8d..cfe23df 100644 --- a/gameserv/Changes +++ b/gameserv/Changes @@ -1,4 +1,5 @@ Version 1.1.9 +* Fixed a core in RUN if a client wasn't playing. - wcampbel * Added an option to specify the PID file in the config file. - kain Version 1.1.8 * Missing directives now are identified for config files upon startup - kain diff --git a/gameserv/gameserv.cpp b/gameserv/gameserv.cpp index fe88ad2..e0a9b66 100644 --- a/gameserv/gameserv.cpp +++ b/gameserv/gameserv.cpp @@ -1131,6 +1131,12 @@ void do_run(char *u) return; } + else if (!is_playing(user)) + { + notice(s_GameServ, u, "You must be playing to use items!"); + return; + } + p = user->stats; if (p->battle)