diff options
| -rw-r--r-- | catgirl.1 | 9 | ||||
| -rw-r--r-- | chat.c | 2 | ||||
| -rw-r--r-- | chat.h | 1 | ||||
| -rw-r--r-- | ui.c | 4 | 
4 files changed, 13 insertions, 3 deletions
@@ -1,4 +1,4 @@ -.Dd July  2, 2021 +.Dd July 20, 2021  .Dt CATGIRL 1  .Os  . @@ -8,7 +8,7 @@  .  .Sh SYNOPSIS  .Nm -.Op Fl KRelv +.Op Fl KRelqv  .Op Fl C Ar copy  .Op Fl H Ar hash  .Op Fl I Ar highlight @@ -323,6 +323,11 @@ Connect to  .Ar port .  The default port is 6697.  . +.It Fl q | Cm quiet +Raise the default message visibility threshold +for new windows, +hiding general events. +.  .It Fl r Ar real | Cm real No = Ar real  Set realname to  .Ar real . @@ -257,6 +257,7 @@ int main(int argc, char *argv[]) {  		{ .val = 'n', .name = "nick", required_argument },  		{ .val = 'o', .name = "print-chain", no_argument },  		{ .val = 'p', .name = "port", required_argument }, +		{ .val = 'q', .name = "quiet", no_argument },  		{ .val = 'r', .name = "real", required_argument },  		{ .val = 's', .name = "save", required_argument },  		{ .val = 't', .name = "trust", required_argument }, @@ -300,6 +301,7 @@ int main(int argc, char *argv[]) {  			break; case 'n': nick = optarg;  			break; case 'o': printCert = true;  			break; case 'p': port = optarg; +			break; case 'q': uiThreshold = Warm;  			break; case 'r': real = optarg;  			break; case 's': save = optarg;  			break; case 't': trust = optarg; @@ -292,6 +292,7 @@ void commandCompleteAdd(void);  enum Heat { Ice, Cold, Warm, Hot };  enum { TimeCap = 64 }; +extern enum Heat uiThreshold;  extern struct Time {  	bool enable;  	const char *format; @@ -127,6 +127,8 @@ static struct Window *windowRemove(uint num) {  	return window;  } +enum Heat uiThreshold = Cold; +  static uint windowFor(uint id) {  	for (uint num = 0; num < windows.len; ++num) {  		if (windows.ptrs[num]->id == id) return num; @@ -136,7 +138,7 @@ static uint windowFor(uint id) {  	window->id = id;  	window->mark = true;  	window->time = uiTime.enable; -	window->thresh = Cold; +	window->thresh = uiThreshold;  	window->buffer = bufferAlloc();  	completeAdd(None, idNames[id], idColors[id]);  	return windowPush(window);  | 
