ary[1] = uData->handle->handle;
if(uData->present)
ary[2] = "Here";
+ else if(HANDLE_FLAGGED(uData->handle, NETWORK))
+ ary[2] = "Here";
else if(!uData->seen)
ary[2] = "Never";
else
ary[2] = strdup(ary[2]);
if(IsUserSuspended(uData))
ary[3] = "Suspended";
+ else if(HANDLE_FLAGGED(uData->handle, OPER))
+ ary[3] = "Operator";
+ else if(HANDLE_FLAGGED(uData->handle, HELPING))
+ ary[3] = "Staff";
+ else if(HANDLE_FLAGGED(uData->handle, NETWORK))
+ ary[3] = "Network";
else if(HANDLE_FLAGGED(uData->handle, FROZEN))
ary[3] = "Vacation";
else if(HANDLE_FLAGGED(uData->handle, BOT))
if(!isdigit(topic[pos]))
break;
}
- if(advtopic_index < 0 || advtopic_index > MAXADVTOPICENTRIES)
+ if(advtopic_index < 0 || advtopic_index >= MAXADVTOPICENTRIES)
{
//invalid id!
- reply("CSMSG_ADVTOPIC_INVALID_ID", advtopic_index);
+ reply("CSMSG_ADVTOPIC_INVALID_ID", advtopic_index+1);
return 0;
}
if(cData->advtopic[advtopic_index])
new_topic[dpos++] = *ptr; //is % again
break;
}
- ptr--;
advtopic_index--; //no zero base
if(!cData->advtopic[advtopic_index])
break; //just leave it empty
break;
case '\\':
ptr++; /* and fall through */
+ if(!*ptr) break;
default:
new_topic[dpos++] = *ptr;
+ ptr++;
break;
}
- ptr++;
}
} else {
while((tchar = topic_mask[pos++]) && (dpos <= TOPICLEN))