summary refs log tree commit diff
path: root/scoop.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-05 10:45:17 -0400
committerJune McEnroe <june@causal.agency>2020-04-05 10:45:17 -0400
commita8c5d13cb21ef08f7d2b5a718b5c93113dfc6448 (patch)
treedc3b606b12ebb467cd8bd464f5ee47ec463130c5 /scoop.c
parentUpdate style (diff)
downloadlitterbox-a8c5d13cb21ef08f7d2b5a718b5c93113dfc6448.tar.gz
litterbox-a8c5d13cb21ef08f7d2b5a718b5c93113dfc6448.zip
Add Ban and Unban event types
Diffstat (limited to 'scoop.c')
-rw-r--r--scoop.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/scoop.c b/scoop.c
index a1b75c7..d95a971 100644
--- a/scoop.c
+++ b/scoop.c
@@ -77,6 +77,12 @@ static void formatPlain(bool group, struct Event e) {
 		break; case Topic: {
 			printf("%s set the topic: %s\n", e.nick, e.message);
 		}
+		break; case Ban: {
+			printf("%s banned %s\n", e.nick, e.target);
+		}
+		break; case Unban: {
+			printf("%s unbanned %s\n", e.nick, e.target);
+		}
 	}
 }
 
@@ -189,6 +195,12 @@ static void formatColor(bool group, struct Event e) {
 				color(e.user), e.nick, ansi(e.message)
 			);
 		}
+		break; case Ban: {
+			printf(C "%s" O " banned %s\n", color(e.user), e.nick, e.target);
+		}
+		break; case Unban: {
+			printf(C "%s" O " unbanned %s\n", color(e.user), e.nick, e.target);
+		}
 	}
 #undef C
 #undef O
@@ -230,6 +242,12 @@ static void formatIRC(bool group, struct Event e) {
 		break; case Topic: {
 			printf("TOPIC %s :%s\r\n", e.context, e.message);
 		}
+		break; case Ban: {
+			printf("MODE %s +b %s\r\n", e.context, e.target);
+		}
+		break; case Unban: {
+			printf("MODE %s -b %s\r\n", e.context, e.target);
+		}
 	}
 }
 
86ac0fec50a8349264588&follow=1'>Add copy paste to psfedJune McEnroe 2018-09-25Add r to psfed for invertJune McEnroe 2018-09-24Add psfed, a PSF2 font editorJune McEnroe 2018-09-21Add scheme -i to swap white and blackJune McEnroe 2018-09-21Map caps lock to escape on Linux consoleJune McEnroe 2018-09-19Fix README mandoc lintsJune McEnroe 2018-09-19Un-NOT trans.alpha values in pngoJune McEnroe 2018-09-18Refactor reads in pngo and clear palette between filesJune McEnroe 2018-09-17Add tRNS support to pngoJune McEnroe 2018-09-11Move gfx man pages to gfx/manJune McEnroe 2018-09-11Move bin man pages to bin/manJune McEnroe 2018-09-11Rewrite gfx.7 and render plaintext READMEJune McEnroe 2018-09-11Remove GAMES from BINSJune McEnroe 2018-09-11Rewrite bin.7 and render to plaintext READMEJune McEnroe 2018-09-11Add "blank" lines to man pagesJune McEnroe 2018-09-10Add mdoc syntax fileJune McEnroe 2018-09-08Fix Nm usage in multi-name man pagesJune McEnroe 2018-09-08Put real dates on man pagesJune McEnroe 2018-09-08Replace gfx README with REAMDE.7June McEnroe 2018-09-08Link gfx man pages in ~/.localJune McEnroe