suppressmotd

来自「EPIC IRC客户端。来源于IRCII客户端但做了很多性能和功能的优化。」· 代码 · 共 46 行

TXT
46
字号
## Here's the story.  We want to suppress server-side MOTDs.# I don't know why anyone would want to do this, but eh, this# used to be an epic function and i removed it and people noticed# it so I'm honor bound to script it at the very least.#@ suppress_server_motd = 0on ^set "suppress_server_motd on" {@suppress_server_motd = 1}on ^set "suppress_server_motd off" {@suppress_server_motd = 0}do{	@ negser = getserial(HOOK - 0)	@ posser = getserial(HOOK + 0)	# The first time we see the MOTD, trigger the "doing motd" flag.	on #^375 $negser * {		if (!done_motd[$lastserver()]) {			^assign doing_motd[$lastserver()] 1		}	}	# When we see the end of the first MOTD, trigger the "done motd" flag.	on #^376 $posser * {		if (doing_motd[$lastserver()]) {			^assign -doing_motd[$lastserver()]			^assign done_motd[$lastserver()] 1		}	}	# When the connection is closed, reset the flag.	on #^server_lost $posser * {		^assign -done_motd[$lastserver()]	}	# Only suppress the first MOTD from each server connection.	for i in (372 375 376 377) { 	    on ^$i * { 		if (suppress_server_motd && doing_motd[$lastserver()]) { 			return 		}		xecho -b $1-	    }	}}#hop'y2k+3

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?