Re: [X2serv-cvs] CVS: x2/source commands.c,1.146,1.147
Brought to you by:
sirvulcan
From: Alex <ru...@bl...> - 2001-05-11 00:49:07
|
i'm uneasy with this, because the existance or not of a nick on irc i dont think should effect the context of command paramiters. in the least it could confuse people, in the most could be a security consern. Alex Schumann ru...@af... "You can no more win a war than http://www.loxxin.net/~rubin you can win an earthquake." --Jeannette Rankin (1880-1973) On Thu, 10 May 2001, Richard Peters wrote: > 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); > > > _______________________________________________ > X2serv-cvs mailing list > X2s...@li... > http://lists.sourceforge.net/lists/listinfo/x2serv-cvs > |