- Timestamp:
- Mar 2, 2014, 1:50:57 AM (11 years ago)
- Branches:
- master
- Children:
- 59a7416
- Parents:
- d554223
- git-author:
- Mike Belopuhov <mike@…> (03/02/14 01:48:34)
- git-committer:
- Mike Belopuhov <mike@…> (03/02/14 01:50:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
icb.c
rd554223 r1d2125a 35 35 void icb_login(struct icb_session *, char *, char *, char *); 36 36 int icb_dowho(struct icb_session *, struct icb_group *); 37 int icb_modpermit(struct icb_session *); 37 38 char *icb_nextfield(char **); 38 39 … … 518 519 519 520 /* 521 * icb_modpermit: checks user against the moderators table if it has 522 * been populated 523 */ 524 int 525 icb_modpermit(struct icb_session *is) 526 { 527 extern char modtab[ICB_MTABLEN][ICB_MAXNICKLEN]; 528 extern int modtabcnt; 529 530 if (modtabcnt == 0 || 531 bsearch(is->nick, modtab, modtabcnt, ICB_MAXNICKLEN, 532 (int (*)(const void *, const void *))strcmp)) 533 return (1); 534 return (0); 535 } 536 537 /* 520 538 * icb_pass: passes moderation of group "ig" from "from" to "to", 521 539 * returns -1 if "from" is not a moderator, 1 if passed … … 530 548 return (-1); 531 549 if (!from && !to) 550 return (-1); 551 if (to && !icb_modpermit(to)) 532 552 return (-1); 533 553 ig->mod = to;
Note:
See TracChangeset
for help on using the changeset viewer.