Modify /scan family of commands. Now shows halfops, /scans for shitlist
works, and a few other changes. Some things might look a bit hinky, more work needed. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@44 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1377,14 +1377,16 @@ int cols = get_int_var(NAMES_COLUMNS_VAR);
|
|||||||
{
|
{
|
||||||
if (voice && nick_isvoice(nick))
|
if (voice && nick_isvoice(nick))
|
||||||
count++;
|
count++;
|
||||||
else if (ops && nick_isop(nick))
|
else if (ops && (nick_isop(nick) || nick_ishalfop(nick)))
|
||||||
count++;
|
count++;
|
||||||
else if (nops && !nick_isop(nick))
|
else if (nops && !nick_isop(nick) && !nick_ishalfop(nick))
|
||||||
count++;
|
count++;
|
||||||
else if (ircops && nick_isircop(nick))
|
else if (ircops && nick_isircop(nick))
|
||||||
count++;
|
count++;
|
||||||
else if (friends && nick->userlist)
|
else if (friends && nick->userlist)
|
||||||
count++;
|
count++;
|
||||||
|
else if (shit && nick->shitlist)
|
||||||
|
count++;
|
||||||
else if (all)
|
else if (all)
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@@ -1411,6 +1413,9 @@ int cols = get_int_var(NAMES_COLUMNS_VAR);
|
|||||||
count = 0;
|
count = 0;
|
||||||
for (nick = snick; nick; nick = nick->next)
|
for (nick = snick; nick; nick = nick->next)
|
||||||
{
|
{
|
||||||
|
char *nick_format;
|
||||||
|
char nick_sym;
|
||||||
|
|
||||||
if (match_host)
|
if (match_host)
|
||||||
{
|
{
|
||||||
int len = strlen(nick->nick)+strlen(nick->host)+4;
|
int len = strlen(nick->nick)+strlen(nick->host)+4;
|
||||||
@@ -1420,24 +1425,45 @@ int cols = get_int_var(NAMES_COLUMNS_VAR);
|
|||||||
if (!wild_match(match_host, t))
|
if (!wild_match(match_host, t))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (all && (nick_isop(nick) || nick_isvoice(nick)))
|
|
||||||
malloc_strcat(&buffer, convert_output_format(fget_string_var(nick_isop(nick)?FORMAT_NAMES_OPCOLOR_FSET:FORMAT_NAMES_VOICECOLOR_FSET),"%c %s",nick_isop(nick)?'@':'+', nick->nick));
|
/* Determine if the nick should be shown. */
|
||||||
else if (all)
|
if ( (voice && !nick_isvoice(nick))
|
||||||
malloc_strcat(&buffer, convert_output_format(fget_string_var(FORMAT_NAMES_NICKCOLOR_FSET),"%c %s",'$', nick->nick));
|
|| (ops && !nick_isop(nick) && !nick_ishalfop(nick))
|
||||||
else if (voice && nick_isvoice(nick))
|
|| (nops && (nick_isop(nick) || nick_ishalfop(nick)))
|
||||||
malloc_strcat(&buffer, convert_output_format(fget_string_var(FORMAT_NAMES_VOICECOLOR_FSET),"%c %s",'+', nick->nick));
|
|| (ircops && !nick_isircop(nick))
|
||||||
else if (ops && nick_isop(nick))
|
|| (friends && !nick->userlist)
|
||||||
malloc_strcat(&buffer, convert_output_format(fget_string_var(FORMAT_NAMES_OPCOLOR_FSET),"%c %s",'@', nick->nick));
|
|| (shit && !nick->shitlist))
|
||||||
else if (friends && nick->userlist)
|
|
||||||
malloc_strcat(&buffer, convert_output_format(nick_isop(nick)?fget_string_var(FORMAT_NAMES_FRIENDCOLOR_FSET):fget_string_var(FORMAT_NAMES_NICKCOLOR_FSET),"%c %s",nick_isop(nick)?'@':'<EFBFBD>', nick->nick));
|
|
||||||
else if (nops && !nick_isop(nick))
|
|
||||||
malloc_strcat(&buffer, convert_output_format(fget_string_var(FORMAT_NAMES_NICKCOLOR_FSET),"%c %s",'$', nick->nick));
|
|
||||||
else if (ircops && nick_isircop(nick))
|
|
||||||
malloc_strcat(&buffer, convert_output_format(fget_string_var(FORMAT_NAMES_OPCOLOR_FSET),"%c %s",'*', nick->nick));
|
|
||||||
else if (shit && nick->shitlist)
|
|
||||||
malloc_strcat(&buffer, convert_output_format(fget_string_var(FORMAT_NAMES_SHITCOLOR_FSET),"%c %s",'*', nick->nick));
|
|
||||||
else
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Determine the format string to use */
|
||||||
|
if (nick->userlist)
|
||||||
|
nick_format = fget_string_var(FORMAT_NAMES_FRIENDCOLOR_FSET);
|
||||||
|
else if (nick->shitlist)
|
||||||
|
nick_format = fget_string_var(FORMAT_NAMES_SHITCOLOR_FSET);
|
||||||
|
else if (nick_isop(nick) || nick_ishalfop(nick))
|
||||||
|
nick_format = fget_string_var(FORMAT_NAMES_OPCOLOR_FSET);
|
||||||
|
else if (nick_isvoice(nick))
|
||||||
|
nick_format = fget_string_var(FORMAT_NAMES_VOICECOLOR_FSET);
|
||||||
|
else if (nick_isircop(nick))
|
||||||
|
nick_format = fget_string_var(FORMAT_NAMES_OPCOLOR_FSET);
|
||||||
|
else
|
||||||
|
nick_format = fget_string_var(FORMAT_NAMES_NICKCOLOR_FSET);
|
||||||
|
|
||||||
|
/* Determine the special symbol, if any, to use. */
|
||||||
|
if (nick_isop(nick))
|
||||||
|
nick_sym = '@';
|
||||||
|
else if (nick_ishalfop(nick))
|
||||||
|
nick_sym = '%';
|
||||||
|
else if (nick_isvoice(nick))
|
||||||
|
nick_sym = '+';
|
||||||
|
else if (nick_isircop(nick))
|
||||||
|
nick_sym = '*';
|
||||||
|
else
|
||||||
|
nick_sym = '.';
|
||||||
|
|
||||||
|
malloc_strcat(&buffer,
|
||||||
|
convert_output_format(nick_format, "%c %s", nick_sym,
|
||||||
|
nick->nick));
|
||||||
malloc_strcat(&buffer, space);
|
malloc_strcat(&buffer, space);
|
||||||
if (count++ >= (cols - 1))
|
if (count++ >= (cols - 1))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user