[READ-ONLY] Mirror of https://github.com/VibeDevelopers/atheme. Modified fork of atheme IRC Services www.vibetalk.net/
0

Configure Feed

Select the types of activity you want to include in your feed.

ALIS: Allow filtering channels by registered/unregistered status

Aaron Jones (Mar 4, 2024, 6:30 AM UTC) 6c69e85a 7e3a2fea

+22 -1
+1
help/default/alis/list
··· 10 10 -max <n>: show only channels with at most <n> users 11 11 -skip <n>: skip first <n> matches 12 12 -show [m][t]: show modes/topicsetter 13 + -show [r|u]: show registered/unregistered channels only 13 14 -mode <+|-|=><modes>: modes set/unset/equal 14 15 -topic <pattern>: topic matches pattern 15 16 #if priv chan:auspex
+21 -1
modules/alis/main.c
··· 64 64 bool mode_limit; 65 65 bool mode_ext[256]; 66 66 bool show_mode; 67 - bool show_topicwho; 67 + bool show_regonly; 68 68 bool show_secret; 69 + bool show_topicwho; 70 + bool show_unregonly; 69 71 char mask[BUFSIZE]; 70 72 char topic[BUFSIZE]; 71 73 }; ··· 218 220 if (strchr(arg, 'm')) 219 221 query->show_mode = true; 220 222 223 + if (strchr(arg, 'r')) 224 + query->show_regonly = true; 225 + 221 226 if (strchr(arg, 't')) 222 227 query->show_topicwho = true; 228 + 229 + if (strchr(arg, 'u')) 230 + query->show_unregonly = true; 231 + 232 + if (query->show_regonly && query->show_unregonly) 233 + { 234 + (void) command_fail(si, fault_badparams, _("Invalid option for \2%s\2"), opt); 235 + return false; 236 + } 223 237 } 224 238 else if (strcasecmp(opt, "-mode") == 0) 225 239 { ··· 348 362 if (query->mode_ext[i] && ! chptr->extmodes[i]) 349 363 return false; 350 364 } 365 + 366 + if (query->show_regonly && ! chptr->mychan) 367 + return false; 368 + 369 + if (query->show_unregonly && chptr->mychan) 370 + return false; 351 371 352 372 if (*query->mask && match(query->mask, chptr->name)) 353 373 return false;