To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Savebuff/KVIrc

From ZNC
Revision as of 18:28, 17 December 2011 by DarthGandalf (talk | contribs) (Created page with "===== KVIrc Script ===== made by Skyliner event(OnChannelMessage,savebuff) { if($0 == "*savebuff") { ## unixtimestamp extrahieren ## %time = $str.word(0,$3) if...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
KVIrc Script

made by Skyliner

event(OnChannelMessage,savebuff)
{
	if($0 == "*savebuff")
		{
		## unixtimestamp extrahieren ##
		%time = $str.word(0,$3)
		if($str.isnumber(%time))
			{
			## timestamp umrechnen ##
			%time = $time(%time)
			##  resttext extrahieren ##
			%msg = $str.rightfromfirst($3,$char(32))
			## join, part, quit und Nickchange ##
			if($str.contains(%msg,JOIN))%msgtype = Join;
			if($str.contains(%msg,QUIT))%msgtype = Quit;
			if($str.contains(%msg,PART))%msgtype = Part;
			if($str.contains(%msg,NICK))%msgtype = Nick;
			## usermodes ##
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,+v)))%msgtype = Voice;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,+o)))%msgtype = Op;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,+q)))%msgtype = chanOwner;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,+a)))%msgtype = chanAdmin;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,+h)))%msgtype = Halfop;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+b)))%msgtype = Ban;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+e)))%msgtype = BanExcept;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-v)))%msgtype = deVoice;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-o)))%msgtype = deOp;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-q)))%msgtype = chanunOwner;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-a)))%msgtype = chanunAdmin;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-h)))%msgtype = Halfdeop;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-b)))%msgtype = UnBan;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-e)))%msgtype = BanUnexcept;
			## channelmodes ##
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+p)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+s)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+t)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+n)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+m)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+i)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+l)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+k)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+r)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+R)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+c)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+O)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+A)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+Q)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+K)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+V)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+C)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+u)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+Z)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+N)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+S)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+M)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+T)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\+G)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-p)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-s)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-t)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-n)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-m)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-i)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-l)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-k)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-r)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-R)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-c)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-O)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-A)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-Q)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-K)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-V)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-C)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-u)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-Z)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-N)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-S)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-M)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-T)))%msgtype = ChanMode;
			if(($str.contains(%msg,MODE)) && ($str.contains(%msg,\-G)))%msgtype = ChanMode;
			## ausgabe ##
			echo -n -i=$msgtype(%msgtype) $k($option(uinttimestampforeground))\[$str.word(3,%time)\]$k %msg
			## originalausgabe unterdrücken ##
			halt
			}
		}
}