Use the value passed to auto_away() instead of recalculating it, and rename
this variable "idle_mins". (From BX2) git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@92 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1184,7 +1184,7 @@ char *BX_random_str(int min, int max)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void auto_away(unsigned long value)
|
void auto_away(unsigned long idle_mins)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *msg = NULL;
|
char *msg = NULL;
|
||||||
@@ -1193,9 +1193,9 @@ void auto_away(unsigned long value)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (awaymsg)
|
if (awaymsg)
|
||||||
malloc_sprintf(&msg, "%s: [%d mins]", convert_output_format(awaymsg, NULL), get_int_var(AUTO_AWAY_TIME_VAR)/60);
|
malloc_sprintf(&msg, "%s: [%lu mins]", convert_output_format(awaymsg, NULL), idle_mins);
|
||||||
else
|
else
|
||||||
malloc_sprintf(&msg, "Auto-Away after %d mins", get_int_var(AUTO_AWAY_TIME_VAR)/60);
|
malloc_sprintf(&msg, "Auto-Away after %lu mins", idle_mins);
|
||||||
|
|
||||||
for (i = 0; i < server_list_size(); i++)
|
for (i = 0; i < server_list_size(); i++)
|
||||||
if (is_server_connected(i) && !get_server_away(i))
|
if (is_server_connected(i) && !get_server_away(i))
|
||||||
|
|||||||
Reference in New Issue
Block a user