[X2serv-cvs] CVS: x2/source commands.c,1.146,1.147
Brought to you by:
sirvulcan
From: Richard P. <lys...@us...> - 2001-05-10 14:28:39
|
Update of /cvsroot/x2serv/x2/source In directory usw-pr-cvs1:/tmp/cvs-serv23886/source Modified Files: commands.c Log Message: Modified .access so that it can be used on handles in the userlist while no one is online under the given nick Index: commands.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/commands.c,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -r1.146 -r1.147 *** commands.c 2001/04/25 06:05:40 1.146 --- commands.c 2001/05/10 14:28:35 1.147 *************** *** 1759,1801 **** char level[10] = ""; ! if (!strcmp(rest, "")) target = uptr; ! else if (!(target = FindNick(rest, UsersN))) ! { ! send_to_user(uptr, "\002Unknown user!\002 (%s)", rest); ! return(FALSE); } ! if (!strcasecmp(IrcNick, rest)) ! { ! send_to_user(uptr, "\002%s\002 is the channel services bot. Type: /msg %s HELP for info on how to use it.", IrcNick, IrcNick); ! if (IsOper(target)) ! send_to_user(uptr, "%s is an \002IRC Operator\002.", target->Nick); ! if (IsGodOper(target)) ! send_to_user(uptr, "%s has \002security override (+h) \002enabled.", target->Nick); ! if (IsModeK(target)) ! send_to_user(uptr, "%s is a \002no-kick service (+k)\002.", target->Nick); ! return(FALSE); } - hptr = FindBestUserMatch(cptr, target); if (hptr && userlevelbychar(hptr->Level) > 0) { ! send_to_user(uptr, "%s : \002%s\002 on %s, under handle: \002%s\002.", target->Nick, levelnamefromchar(hptr->Level), cptr->Name, hptr->Handle); if (strcmp(hptr->Info, "*")) ! send_to_user(uptr, "[%s] %s", target->Nick, hptr->Info); if (IsChanAOp(hptr)) ! send_to_user(uptr, "%s has auto-op turned \002ON\002.", target->Nick); else ! send_to_user(uptr, "%s has auto-op turned \002OFF\002.", target->Nick); } ! else if (IsChanLamer(cptr, target)) send_to_user(uptr, "%s is %s from %s!", target->Nick, level, cptr->Name); else send_to_user(uptr, "%s is not on the %s userlist.", target->Nick, cptr->Name); ! if (IsOper(target)) send_to_user(uptr, "%s is an \002IRC Operator\002.", target->Nick); ! if (IsGodOper(target)) send_to_user(uptr, "%s has \002security override (+h)\002 enabled.", target->Nick); ! if (IsModeK(target)) send_to_user(uptr, "%s is a \002no-kick service (+k)\002.", target->Nick); return(TRUE); --- 1759,1805 ---- char level[10] = ""; ! if (!strcmp(rest, "")) { target = uptr; ! hptr = FindBestUserMatch(cptr, target); } ! else { ! if (!(target = FindNick(rest, UsersN))) ! { ! hptr = FindHandle(cptr, rest); ! if (!hptr) { ! send_to_user(uptr, "\002Unknown user!\002 (%s)", rest); ! return(FALSE); ! } ! } ! else ! hptr = FindBestUserMatch(cptr, target); } if (hptr && userlevelbychar(hptr->Level) > 0) { ! if (target) ! send_to_user(uptr, "%s : \002%s\002 on %s, under handle: \002%s\002.", target->Nick, levelnamefromchar(hptr->Level), cptr->Name, hptr->Handle); + else + send_to_user(uptr, "%s : \002%s\002 on %s.", hptr->Handle, levelnamefromchar(hptr->Level), + cptr->Name); if (strcmp(hptr->Info, "*")) ! send_to_user(uptr, "[%s] %s", target ? target->Nick : hptr->Handle, hptr->Info); if (IsChanAOp(hptr)) ! send_to_user(uptr, "%s has auto-op turned \002ON\002.", target ? target->Nick : hptr->Handle); else ! send_to_user(uptr, "%s has auto-op turned \002OFF\002.", target ? target->Nick : hptr->Handle); } ! else if (target && IsChanLamer(cptr, target)) send_to_user(uptr, "%s is %s from %s!", target->Nick, level, cptr->Name); else send_to_user(uptr, "%s is not on the %s userlist.", target->Nick, cptr->Name); ! ! if (!strcasecmp(IrcNick, rest)) ! send_to_user(uptr, "\002%s\002 is the channel services bot. Type: /msg %s HELP for info on how to use it.", IrcNick, IrcNick); ! if (target && IsOper(target)) send_to_user(uptr, "%s is an \002IRC Operator\002.", target->Nick); ! if (target && IsGodOper(target)) send_to_user(uptr, "%s has \002security override (+h)\002 enabled.", target->Nick); ! if (target && IsModeK(target)) send_to_user(uptr, "%s is a \002no-kick service (+k)\002.", target->Nick); return(TRUE); |