view install.kvs @ 10:c96e3e297de3 dev dev

Changelog angepasst. user: Weegee weegee@taess.eu branch 'dev' changed Changelog.txt
author Weegee weegee@taess.eu
date Mon, 28 Sep 2009 21:33:36 +0200
parents d60dea076954
children 2fea591c9cc5
line wrap: on
line source
# FailEngine

addon.register("fe","0.6.3","FailEngine $char(34)Psyduck$char(34)","The development release of the FailEngine","3.2.4","$file.extractPath($0)/pics/dev.png")
{
##########################	
### Uninstall commands ###
##########################

	# Delete our aliases
	alias(wfver){};
	alias(wnp){};
	alias(wos){};
	alias(wusers){};
	alias(wver){};

	# Delete all popups and/or reset them
	defpopup(channeltextview)
	{
		extpopup($tr("Channels"),channels,46)
	
		item($tr("&Join Channels..."),46) ($server)
		{
			if($option(boolShowChannelsJoinDialogAsToplevel))channelsjoin.open -t;else channelsjoin.open
		}
	
		separator
	
		item($tr("&Hop") $0,145)
		{
			hop $0
		}
	
		item($tr("&Part") $0,40)
		{
			if($channel($0)) eval "part $0 $option(stringPartMessage)";
		}
	
		separator
	
		extpopup(C&TCP,ctcp,51)
	
		separator
	
		item(/NAMES $0,75)
		{
			names $0;
		}
	
		item(/WHO $0,75)
		{
			who $0;
		}
	
		item($tr("Notify Avatar"),57)
		{
			avatar.notify $0
		}
	
		separator
	
		item($tr("Copy Channel URL to Clipboard"),259)
		{
			str.toClipboard $chan.getUrl
		}
	
		item($tr("Clear Buffer"),121)
		{
			clear;
		}
	};
	defpopup(lists){};
	defpopup(irc){};
	defpopup(sys){};
	defpopup(misc){};
	defpopup(nickserv){};
	defpopup(chanserv){};
	defpopup(away){};

	# And don't forget the old one ...
	defpopup(cmd){};

	# Delete all events
	event(OnMeKick,WRejoin){};
	event(OnHighlight,WHL){};
	event(OnInvite,WInvite){};
	event(OnMeKick,WKick){};
	event(OnMeBan,WBan){};

	# And also the raw events
	event(403,W403){};
	event(404,W404){};
	event(408,W408){};
	event(306,W306){};
	event(305,W305){};
	event(341,W341){};
	event(443,W443){};
	event(482,W482){};
	event(432,W432){};
	event(433,W433){};
	event(437,W437){};
	event(471,W471){};
	event(473,W473){};
	event(474,W474){};
	event(475,W475){};
	event(477,W477){};
	event(485,W485){};

	# Clear the modified options
	option stringCtcpVersionPostfix $nothing;
	option stringCtcpSourcePostfix $nothing;

	if (%WuseSG == "1")
	{
		option booluseantispamonprivmsg "%WoptbeforeSG[1]";
		option booluseantispamonnotice "%WoptbeforeSG[2]";
		option boolsilentantispam "%WoptbeforeSG[3]";
		option stringlistspamwords "%WoptbeforeSG[4]";
		option boolusectcpfloodprotection "%WoptbeforeSG[5]";
		option uintmaxctcprequests "%WoptbeforeSG[6]";
		option uintctcpfloodcheckinterval "%WoptbeforeSG[7]";
		option boolenableignoreonprivmsg "%WoptbeforeSG[8]";
		option boolenableignoreonnotice "%WoptbeforeSG[9]";
		option boolverboseignore "%WoptbeforeSG[10]";
		option boolcreatequeryonprivmsg "%WoptbeforeSG[11]";
		option boolenablequerytracing "%WoptbeforeSG[12]";
		option boolshowextendedinfoinquerylabel "%WoptbeforeSG[13]";
		option boolrejoinchannelonkick "%WoptbeforeSG[14]";
		option boolautojoinoninvite "%WoptbeforeSG[15]";
	}
}

# Getting the installer ...
%Mypath = $file.extractPath($0)
parse %Mypath/utils/installer.kvs

# The installer will copy our files
%installer = $new(installer,0,myinstaller)
file.mkdir $file.localdir("pics/fe")
%installer->$copyFiles("%Mypath/pics/","*.png",$file.localdir("pics/fe"))

# finally kill the installer helper
delete %installer

# Run first configuration
dialog.message("Configure $char(40)1$char(47)4$char(41)","Welcome to the FailEngine setup! You have to configure FailEngine before you can use it.<br> Please answer to all questions and don't close any window, otherwise you'll have a destroyed addon installed on your system.",260,"OK")
{
	dialog.message("Configure $char(40)2$char(47)4$char(41)","Do you want to use the <b>German</b> version of the FailEngine or the <b>English</b> one? No matter what you choose, the setup will continue in English. And disregard the icons displayed on the buttons - they don't have any relevance.",260,"English","German")
	{
		if($0 == 0)
		{
			parse %Mypath/src/en/aliases.kvs
			parse %Mypath/src/en/events.kvs
			parse %Mypath/src/en/popups.kvs
			option stringCtcpVersionPostfix " Running with $b()FailEngine v0.6.3 $char(34)Psyduck$char(34)$o()";
			option stringCtcpSourcePostfix " Get the current version of the FailEngine on $b()http://flyurl.de/fe$o()";
		}
		else if($0 == 1)
		{
			parse %Mypath/src/de/aliases.kvs
			parse %Mypath/src/de/events.kvs
			parse %Mypath/src/de/popups.kvs
			option stringCtcpVersionPostfix " Enth??lt die $b()FailEngine v0.6.3 $char(34)Psyduck$char(34)$o()";
			option stringCtcpSourcePostfix " Hol dir die aktuelle Version der FailEngine auf $b()http://flyurl.de/fe$o()";
		}
		dialog.message("Configure $char(40)3$char(47)4$char(41)","Do you want to enable the <i>FailEngine security guard</i>? It's a script which includes spam protection in private messages and notices and a CTCP flood protection. It also enables a few options which provide more safety.<br> If you don't like a modified setting you can reset it.",260,"Enable $char(40)recommended$char(41)","Disable")
		{
			if($0 == 0)
			{
				%WoptbeforeSG = $array("$option(booluseantispamonprivmsg)","$option(booluseantispamonnotice)","$option(boolsilentantispam)","$option(stringlistspamwords)","$option(boolusectcpfloodprotection)","$option(uintmaxctcprequests)","$option(uintctcpfloodcheckinterval)","$option(boolenableignoreonprivmsg)","$option(boolenableignoreonnotice)","$option(boolverboseignore)","$option(boolcreatequeryonprivmsg)","$option(boolenablequerytracing)","$option(boolshowextendedinfoinquerylabel)","$option(boolrejoinchannelonkick)","$option(boolautojoinoninvite)");
				%WuseSG = "1";
				parse %Mypath/src/guard.kvs
			}
			dialog.message("Configure $char(40)4$char(47)4$char(41)","Are you using Rhythmbox or Banshee as your favorite music player?",260,"Rhythmbox","Banshee")
			{
				if($0 == 0)
				{
					parse %Mypath/src/wnpR.kvs
				}
				else if($0 == 1)
				{
					parse %Mypath/src/wnpB.kvs
				}
				dialog.message("Configure - Done!","That's all, you're done!",260,"OK"){};
			};
		};
	};
};

# configure callback
addon.setconfigurecallback("fe")
{
	dialog.message("Configure","Do you want to reset all modified options to their default value?",260,"Yes","No")
	{
		if ($0 == 0)
		{
		option booluseantispamonprivmsg "%WoptbeforeSG[1]";
		option booluseantispamonnotice "%WoptbeforeSG[2]";
		option boolsilentantispam "%WoptbeforeSG[3]";
		option stringlistspamwords "%WoptbeforeSG[4]";
		option boolusectcpfloodprotection "%WoptbeforeSG[5]";
		option uintmaxctcprequests "%WoptbeforeSG[6]";
		option uintctcpfloodcheckinterval "%WoptbeforeSG[7]";
		option boolenableignoreonprivmsg "%WoptbeforeSG[8]";
		option boolenableignoreonnotice "%WoptbeforeSG[9]";
		option boolverboseignore "%WoptbeforeSG[10]";
		option boolcreatequeryonprivmsg "%WoptbeforeSG[11]";
		option boolenablequerytracing "%WoptbeforeSG[12]";
		option boolshowextendedinfoinquerylabel "%WoptbeforeSG[13]";
		option boolrejoinchannelonkick "%WoptbeforeSG[14]";
		option boolautojoinoninvite "%WoptbeforeSG[15]";
		}
	}
}