Changeset 2be3612 in code
- Timestamp:
- Aug 30, 2017, 12:13:47 AM (8 years ago)
- Branches:
- master
- Children:
- 4a74b5b
- Parents:
- 614260f
- git-author:
- Mike Belopuhov <mike@…> (08/30/17 00:13:24)
- git-committer:
- Mike Belopuhov <mike@…> (08/30/17 00:13:47)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cmd.c
r614260f r2be3612 327 327 char whom[ICB_MAXNICKLEN]; 328 328 329 if (!ig->mod) { /* if there is no mod, try grabbing it */ 330 if (icb_modpermit(is, 0) && icb_pass(ig, ig->mod, is) < 0) 331 icb_error(is, "Acquiring group moderation failed."); 332 } else if (icb_ismod(ig, is)) { 329 if (icb_ismod(ig, is)) { 330 /* 331 * we're a current group moderator, allow to relinquish 332 * the right and to pass it down to everybody else. 333 */ 333 334 if (strlen(arg) == 0) { 334 335 /* no argument: relinquish moderator */ … … 345 346 return; 346 347 } 347 if (icb_ modpermit(s, 0) && icb_pass(ig, ig->mod, s) < 0)348 icb_error( s, "Acquiring group moderation failed.");348 if (icb_pass(ig, ig->mod, s) < 0) 349 icb_error(is, "Failed to pass group moderation."); 349 350 } else { 350 351 /* 351 352 * if group is moderated and we're not the moderator, 352 353 * but modtab is enabled, then check the permission 353 * and pass moderation if successful. 354 * and pass moderation if successful. if there's no 355 * current moderator, don't enforce the modtab. 354 356 */ 355 if (icb_modpermit(is, 1) && icb_pass(ig, ig->mod, is) < 0) 356 icb_error(is, "Acquiring group moderation failed."); 357 if (!icb_modpermit(is, ig->mod ? 1 : 0)) { 358 icb_error(is, "Operation not permitted."); 359 return; 360 } 361 if (icb_pass(ig, ig->mod, is) < 0) 362 icb_error(is, "Failed to acquire group moderation."); 357 363 } 358 364 }
Note:
See TracChangeset
for help on using the changeset viewer.