#!/usr/bin/perl
#
#
#  ___________             _________            .__     ___________
#  \_   _____/_ __  ____  /   _____/ ___________|__|____\__    ___/
#   |    __)|  |  \/    \ \_____  \_/ ___\_  __ \  \____ \|    |   
#   |     \ |  |  /   |  \/        \  \___|  | \/  |  |_> >    |   
#   \___  / |____/|___|  /_______  /\___  >__|  |__|   __/|____|   
#       \/             \/        \/     \/         |__|            
#                      _______     ________  
#                      \   _  \    \_____  \ 
#                      /  /_\  \    /  ____/ 
#                      \  \_/   \  /       \ 
#                       \_____  / /\_______ \
#                             \/  \/       \/
#

# Config


#  _____          ____     
# / ___/__  ___  / _(_)__ _
#/ /__/ _ \/ _ \/ _/ / _ `/
#\___/\___/_//_/_//_/\_, / 
#                   /___/  
#
# FÃ¼r Status Scrupt ausgewÃ¤hlte Namen....
$fun_nick_on ="joogi";
$fun_nick_afk ="joogi`wech";
$fun_nick_work ="joogi`wOrk";
$fun_nick_zzz ="joogi`zzZZzz";
$fun_nick_school ="joogi`sch00l";
$fun_nick_q3 ="joogi`ply";
$fun_nick_et ="joogi`et";
$fun_nick_wolf ="joogi`wolf";
$fun_nick_sauer ="joogi`cube";
$fun_nick_other ="joogi`ply";

$fun_amsg_afk ="halt mal wech :P";
$fun_amsg_school ="away...plubb0rt in der Schule rum....*plubb0r*";
$fun_amsg_zzz ="zzZZzz..-.,.chhhRRRR.-,-.,.puhhhHHHh.,.-,.";
$fun_amsg_work ="..*hmpf*...arbeiten.-....";
$fun_amsg_q3 ="daddeling *fizz* q3 xD ....";
$fun_amsg_et ="*rattter rattter* playing et :> ....";
$fun_amsg_wolf ="*fg* schrotting his  rtcw  8) ....";
$fun_amsg_saue ="zogging das gute alte sauerbraten :] ....";
$fun_amsg_other ="daddling der penn0r...";
# Standart Einstellung fÃ¼r das Look Script...(siehe /fhelp)
# DEFLAUT = 2
$fun_look ="2";

# Toggle ob das Leetscript von Anfang an eingeschaltet ist.
# 0 = aus
# 1 = an
# DEFLAUT = 0
$fun_toogle_leet ="0";

# FÃ¼r das War Search Script...
# gibt an in welchen Channels er nach Wars suchen soll
# Beispiel: 
# @fun_3on3 =("#3on3.et","#3on3");
@fun_3on3 = ("#3on3.et");
@fun_4on4 = ("#4on4.et");
@fun_5on5 = ("#5on5.et");
@fun_6on6 = ("#6on6.et");

# Speicherort der Launchinfo.txt fÃ¼r das Xqf Script
# DEFLAUT = $ENV{HOME}/.qf/LaunchInfo.txt
$fun_xqf_launch_file = "$ENV{HOME}/.qf/LaunchInfo.txt";
# Wie schnell oder langsam das Script nach der Launchinfo schaut
# DEFLAUT = 2000
$fun_xqf_launch_timer = "2000";
# Gibt an ob bei Spielstart dein name geÃ¤ndert wir
# 1 = an
# 0 = aus
# DEFLAUT = 1
$fun_allow_name_change = "1";
# Gibt an in Welchen Channels das Xqf deine Du spielts auch dem und dem Srv ausgibt
# Beispiel: 
# @fun_3on3 =("#aloaq","#mowl.et");
@fun_xqf_channels = ("#aloaq");
# Gibt an ob das XQF script std mÃ¤ÃŸig aktiverit ist
# 1 = an
# 0 = aus
# DEFLAUT = 1
$fun_xqf_toogle = "1";


# AmaroK
# Gibt an wieviele folgenden Songs (+1 fÃ¼r das aktuelle Lied) angezeigt werden
$fun_ama_max_songs = 5;
# Path fÃ¼r die current.xml von AmaroK
$fun_ama_current_file = "$ENV{HOME}/.kde/share/apps/amarok/current.xml";


# FunScriPt Query BloCker
#Gibt an Ob der Query Blocker eingeschaltet ist oder nicht
# 1 = an
# 0 = aus
# DEFAULT = 1
$fun_qb_status = 1;
#FilePath fÃ¼r allowlist und blocklist
#DEFAULT $xchat/[allow|block]file.conf
# PATH TO XCHAT
my $xchat = Xchat::get_info("xchatdir");
#
$fun_qb_allowfile = "$xchat/allowfile.conf";
$fun_qb_blockfile = "$xchat/blockfile.conf";
#Gibt den Modus fÃ¼r den Queryblocker an...
# 1 = Normale Abfrage wo du annimmst
# 2 = Fragt den User nach einem Passwort (mit Triggger)
# DEFAULT = 1
$fun_qb_mod = 2;
# Gibt das Passwort fÃ¼r Mode 2 an
# Hinweis wenn nicht eingeschaltet kann die var leer bleiben
$fun_qb_pw = "123456";
# Gibt an ob bei Mode 2 der !woot Trigger funktioniert
# 1 = an
# 2 = aus
# DEFAULT = 1
$fun_qb_woot = 1;
# Wenn du einen User addest in [TEMP|ALLOW], ob gleich ein qry geÃ¶ffnet werden soll
# 1 = an
# 0 = aus
# DEFAULT = 0 
$fun_qb_auto_qry = 0;
# Ob du beim Ã¶ffnen eines Querys gleich eine Nachricht senden willst
# DEFAULT = undef
$fun_qb_greetings = "";





#  _____          ____          ____        __   
# / ___/__  ___  / _(_)__ _    / __/__  ___/ /__ 
#/ /__/ _ \/ _ \/ _/ / _ `/   / _// _ \/ _  / -_)
#\___/\___/_//_/_//_/\_, /   /___/_//_/\_,_/\__/ 
#                   /___/                    





# DEBUG 
$DEBUG = "0";
$DEBUG2= "0";
$DEBUG3= "0";

# vars fÃ¼r das Script

my $fun_game_name ="";
my $fun_afk_status ="0";
my $fun_nowplaying ="0";
my $current_amsg = "";
my $qbf = 1;
my $qb_first_pw = 1;
my $qb_pass = 1;
my $ignore = 1;
my $current_qry;
my $pw_versuche = 3;
my @ignorelist;
my @startlist;
my @templist;
my @blocklist;
my @allowlist;

$version = "0.24";

Xchat::register("Funscript", $version, "funny Script (for help /fhelp", "");

cprint("FunScript by \0031joog\0038i\0033 loaded");
iprint("For more Help and Infos type /fhelp");
if($fun_qb_status){
fun_read_list('allow');
fun_read_list('block');
}
if(-e $fun_xqf_launch_file){
	xprint("Habe Launchfile gefunden.... lÃ¶sche es....");
 unlink $fun_xqf_launch_file }
#Commands

#Status
Xchat::hook_command("afk","fun_do_afk");
Xchat::hook_command("on","fun_do_on");
Xchat::hook_command("play","fun_do_play");
Xchat::hook_command("school","fun_do_school");
Xchat::hook_command("work","fun_do_work");
Xchat::hook_command("zzz","fun_do_zzz");

#Text
Xchat::hook_command("slap","fun_do_slap");
Xchat::hook_command("","fun_do_colorize");
Xchat::hook_command("color_toogle","fun_do_toogle_colorize");
Xchat::hook_command("hammer","fun_do_hammer");
Xchat::hook_command("jesus","fun_do_jesus");
Xchat::hook_command("klau","fun_do_klau");
Xchat::hook_command("flame","fun_do_flame");
Xchat::hook_command("miez","fun_do_miez");
Xchat::hook_command("leet","fun_do_leet");
Xchat::hook_command("leet_toogle","fun_do_leet_toogle");
Xchat::hook_command("3on3","fun_do_3on3");
Xchat::hook_command("4on4","fun_do_4on4");
Xchat::hook_command("5on5","fun_do_5on5");
Xchat::hook_command("6on6","fun_do_6on6");

#XQF
Xchat::hook_command("return","fun_do_xqf_return");
Xchat::hook_command("re","fun_do_xqf_return");
Xchat::hook_command("xqf_toogle","fun_do_xqf_toogle");
Xchat::hook_timer($fun_xqf_launch_timer,fun_xqf_launch_check);

#PCstats
Xchat::hook_command("pcstats","fun_do_pcstats");

#amaroK
Xchat::hook_command("asong","fun_do_ama_song");
Xchat::hook_command("aplay","fun_do_ama_play");
Xchat::hook_command("apause","fun_do_ama_pause");
Xchat::hook_command("astop","fun_do_ama_stop");
Xchat::hook_command("anext","fun_do_ama_next");
Xchat::hook_command("aprev","fun_do_ama_prev");
Xchat::hook_command("avol","fun_do_ama_vol");
Xchat::hook_command("amute","fun_do_ama_mute");
Xchat::hook_command("amount","fun_do_ama_mount");
Xchat::hook_command("aplaylist","fun_do_ama_playlist");

#INfo & Help
Xchat::hook_command("finfo","fun_do_info");
Xchat::hook_command("fhelp","fun_do_help");

#Query BloCker
Xchat::hook_command("qbadd","fun_qb_add_user");
Xchat::hook_command("qbdel","fun_qb_del_user");
Xchat::hook_command("qbshow","fun_qb_show_user");
Xchat::hook_command("qry","fun_qb_query");
Xchat::hook_print("Private Message to Dialog", "fun_qb_handler");

#subs fÃ¼r die Ausagen von Funscript
sub cprint{
  $line = $_[0];

	Xchat::print("\0032FUN~\002[\002\0033 $line \0032\002]\002\0033---\0039--");
}

sub aprint{
  $line = $_[0];
	Xchat::print("\0032FUN~\002[\002\0033 \0035amaroK:\0033 $line \0032\002]\002\0033---\0039--");
}

sub tprint{
  $line = $_[0];
	Xchat::print("\0032FUN~\002[\002\0033 \0035t00gle:\0033 $line \0032\002]\002\0033---\0039--");
}

sub iprint{
  $line = $_[0];
	Xchat::print("\0032FUN~\002[\002\0033 \0035info:\0033 $line \0032\002]\002\0033---\0039--");
}

sub xprint{
  $line = $_[0];
	Xchat::print("\0032FUN~\002[\002\0033 \0035XQF:\0033 $line \0032\002]\002\0033---\0039--");
}

sub dprint{
  $line = $_[0];
	Xchat::print("\0032FUN~\002[\002\0033 \0035DEBUG:\0033 $line \0032\002]\002\0033---\0039--");
}

sub eprint{
  $line = $_[0];
	Xchat::print("\0032FUN~\002[\002\0033 \0035Error:\0033 $line \0032\002]\002\0033---\0039--");
}

sub qbprint{
  $line = $_[0];
	Xchat::print("\0032FUN~\002[\002\0033 \0035qrYblocKeR:\0033 $line \0032\002]\002\0033---\0039--");
}

sub plprint{
# anfang 8
# title+artist = 36
# album = 36
# rating = 10

  $arg_artist	= $_[0];
  $arg_title	= $_[1];
  $arg_rating	= $_[2];
  $count 	= $_[3];
  my $eof_string;
  $len_artist 	= length $arg_artist;
  $len_title	= length $arg_title; 
  $len_rating	= length $arg_rating;
  $len_count 	= length $count;

 
if($len_artist < 15){
  $at_len = 15 - $len_artist;
}
elsif($len_artist < 25 && $len_artist > 15){
 $at_len = 25 - $len_artist;
}
elsif($len_artist < 25 && $len_artist > 15){
$at_len = 25 - $len_artist;
}
  my $arstring ;

for($x=0;$x<=$at_len;$x++)
  {
	  $arstring = $arstring." ";
  }

 $t_len = 40 - $len_title;

  my $tstring ;

for($x=0;$x<=$t_len;$x++)
  {
	  $tstring = $tstring." ";
  }
 

  my $cstring ;
$c_len = 5 - $len_count;

for($x=0;$x<=$c_len;$x++)
  {
	  $cstring = $cstring." ";
  }

  $eof_string="\0032\002|\002\0033 \002".$count.$cstring."\002 \0032\002:\002\0033 ".$arg_artist.$arstring."  \0032\002-\002\0033   ".$arg_title.$tstring."\0032\002|\002\0033 \002RaTinG:\002 ".$arg_rating;
Xchat::print("$eof_string\n");
			
}

sub hprint{
# cmd = 14
# name = 21
# help = 40
  $arg_name	= $_[0];
  $arg_cmd	= $_[1];
  $arg_help	= $_[2];

  $len_name 	= length $arg_name;
  $len_cmd	= length $arg_cmd; #lÃ¤ngster cmd = 12
  $len_help	= length $arg_help;
  $len_string 	= "90";
  $len_front	= "9";
  $len_end 	= "7";
  my $o_name;
  my $o_cmd;
  my $o_help;
  my $eof_string;
  $name_len = "15" - $len_name;
  my $nstring ;

for($x=0;$x<=$name_len;$x++)
  {
	  $nstring = $nstring." ";
  }

  $o_name=$arg_name.$nstring;
  $cmd_len = 12- $len_cmd;
  my $cstring ;

for($x=0;$x<=$cmd_len;$x++)
  {
	  $cstring = $cstring." ";
  }

  $o_cmd=$arg_cmd.$cstring;
  $help_len = 43- $len_help;
  my $hstring ;

for($x=0;$x<=$help_len;$x++)
  {
	  $hstring = $hstring." ";
  }

  $o_help=$arg_help.$hstring;
  $eof_string="\0032FUN~\002[\002\0033 ".$o_name."\0039\002|\002\0033 ".$o_cmd."\0039\002|\002\0033 ".$o_help." \0032\002]\002\0033---\0039--";
  Xchat::print("$eof_string");
}


sub hhprint{
Xchat::print("\0032FUN~\002[      \0035Name:      \0039|   \0035Command:   \0039|                    \0035Hilfe:                    \0032]\002\0033---\0039--");
};

sub hprinth {

  $arg = $_[0];
  $len_arg = length $arg;
  $len = "16" + $len_arg;
  $l = "92" - $len;
  my $sstring;

for($x=0;$x<=$l;$x++)
  {
	  $sstring = $sstring."-";
  }

  $string = "\0032FUN~\002[\002\0033 \0035".$arg." \0032\002]\002\0033---\0039--".$sstring;
	Xchat::print("$string");
}


sub bprint {

  $arg = $_[0];
	hprint("","",$arg);
}



# subs von Funscript...
sub set_amsg {

  $arg = $_[0];
	
	Xchat::command("me is  $arg");
	Xchat::command("away");
	$current_amsg = $arg;
return Xchat::EAT_ALL;
}

sub re_aw {

  $arg = $_[0];
 Xchat::command("me is back from: $arg");

}

sub fun_do_on {

	Xchat::command("nick $fun_nick_on");
	re_aw($current_amsg);
if($fun_afk_status)
  {
	Xchat::command("away");
  	  $fun_afk_status = 0;
  }
}

sub fun_do_afk {

	Xchat::command("nick $fun_nick_afk");	
	set_amsg($fun_amsg_afk);

  $fun_afk_status = 1;
}

sub fun_do_work {

	Xchat::command("nick $fun_nick_work");
	set_amsg($fun_amsg_work);

  $fun_afk_status = 1;
}

sub fun_do_zzz {

	Xchat::command("nick $fun_nick_zzz");
	set_amsg($fun_amsg_zzz);

  $fun_afk_status = 1;
}

sub fun_do_school {

	Xchat::command("nick $fun_nick_school");
	set_amsg($fun_amsg_school);
	

  $fun_afk_status = 1;
}

sub fun_do_play{

  $arg1 = $_[0][1];
if($arg1 eq "et" || $arg1 eq "1")
  {
	Xchat::command("nick $fun_nick_et");
	set_amsg($fun_amsg_et);
	

	  $fun_afk_status = 1;
  }
if($arg1 eq "q3" || $arg1 eq "2")
  {
	
	Xchat::command("nick $fun_nick_q3");
	set_amsg($fun_amsg_q3);
	

	  $fun_afk_status = 1;
  }
if($arg1 eq "wolf" || $arg1 eq "3")
  {
	Xchat::command("nick $fun_nick_wolf");
	set_amsg($fun_amsg_rtcw);


	  $fun_afk_status = 1;
  }
if($arg1 eq "saue" || $arg1 eq "4")
  {
	Xchat::command("nick $fun_nick_sauer");
	set_amsg($fun_amsg_saue);


	  $fun_afk_status = 1;
  } 
if($arg1 eq "other" || $arg1 eq "")
  {
	Xchat::command("nick $fun_nick_other");
	set_amsg($fun_amsg_other);


	  $fun_afk_status = 1;
  } 

}


sub fun_do_slap {

	my $slapnick = $_[0][1];
	unless($slapnick){
		iprint("Kein nick eingegeben... du muss aber einen eingeben :P");
	} else {
		my @slapit = (
			"deltas vorgeschieÃŸner unterhose",
			"an alienware bigtower.",
			"an SuSE 9.2 Professional manual.",
			"the full perldoc.",
			"a back to the future.",
			"a crowbar (uhhh, that hurts!).",
			"a rather large squid",
			"a hydraulic pump",
			"a book by Stephen King",
			"a 10mbit network card",
			"a ladies handbag",
			"some girl scouts",
			"a football team",
			"a bottle",
			"a yellow marshmellow",
			"a match",
			"the queen of England",
			"a taxi",
			"100 feet of wire",
			"a bag of Cheerios",
			"a hat",
			"a fist",
			"the back hand",
			"the forehead",
			"a computer moniter",
			"a coconut",
			"a microfone",
			"a cellphone",
			"a snowplough",
			"a doggy",
			"Bill Clinton",
			"a stone",
			"a club. With a nail in it",
			"a small asteroid, rich in iron",
			"a small interstellar spaceship",
			"a fresh zuccini",
			"a laptop",
			"a big dictionary",
			"a baseball bat",
			"NeverNet",
			"some porn",
			"a mIRC script",
			"a canoe",
			"a tortoise",
			"a horse",
			"the book of Kells",
			"Tintin's father, HergÃ©",
			"a whale",
			"a rubber dildo",
			"a well groomed poodle",
			"a channel operator",
			"a news paper (New York Times Sunday Edition)",
			"a gnarly werewolf",
			"a vampire. They really suck",
			"a perl script",
			"a bag of doggie chow",
			"a fat walrus",
			"an IPv6 adress",
			"a catholic priest",
			"James Dean",
			"Ronald MacDonald (he *IS* good for something)",
			"Autoconf version 2.13",
			"a PRIVMSG",
			"an email adress",
			"some ANSI color codes",
			"a thermonuclear weapon. Yehaw",
			"the hitch hikers guide to the galaxy, revised edition",
			"Nessie, the Loch Ness monster",
			"a tuna. Still in the can! *BONK* That will leave a mark",
			"a few fluffy pillows",
			"a red chinese dragon",
			"a linux-manual (signed by L. Torvalds)",
			"Stage1",
			"Bill Gates underpants",
			"GM Abraham and the whole OW-Staff",
			"Sphere 1.0",
			"a Linuxkernel",
			"Lenin's Collected Works",
			"Stalin's Collected Works",
			"a iron Tux",
			"a glowing 23",
			"your mum (CLEAN YOUR ROOM!)",
			"a complete GNOME-Documentation",
			"a Portagetree",
			"thand[Z]'s transparent Tanga",
			"a Kernelpanic",
			"Windoze XP",
			"an AK-47 (die, you imperialist dog!)",
			"a bag full with Michael Jacksons droped noses",
			"an NBP-Manifesto (Hail Limonew! Hail our Leader! Hail!)",
			"an NBP-Flag (Lead us to freedom, Leader Limonew!)",
			"Mein Kampf (Doppelausgabe, Hardcover)",
			"Invader Zim's iron fist",
			"some ASCII-Arts",
			"The Family Learning Channel",
			"GOD",
			"Dorian Grey's picture",
			"some unlocked Grenades *BOOM*",
			"the Win2k Buglist"
		);
		my $slapmessage = $slapit[rand@slapit];
		&Xchat::command("me slaps $slapnick with $slapmessage");
	}
}

sub fun_do_colorize {

  $ptr = $_[1][0];

if($fun_toogle_leet)
  {
	$ptr =~ s/e/3/g;
	$ptr =~ s/t/7/g;
	$ptr =~ s/i/!/g;
	$ptr =~ s/l/1/g;
	$ptr =~ s/o/0/g;
	$ptr =~ s/s/5/g;
  }

if($fun_look eq "1")
  {
	$ptr =~ s/;\)/\0035;\0032)\0031/g;
	$ptr =~ s/:\)/\0035:\0032)\0031/g;
	$ptr =~ s/:P/\0033:\0035P\0031/g;
	$ptr =~ s/:D/\0035:\0032D\0031/g;
	$ptr =~ s/xD/\0035x\0032D\0031/g;
	$ptr =~ s/:\]/\0035:\0032]\0031/g;
	$ptr =~ s/:\(/\0035:\0032(\0031/g;
	$ptr =~ s/:\|/\0035:\0032|\0031/g;
	$ptr =~ s/\*/\0032\002*\002\0031/g;
	$ptr =~ s/\^\^/\0032^^\0031/g;
	$ptr =~ s/huhu/\0035h\0032u\0035h\0032u\0031/g;
	$ptr =~ s/lol/\0035l\0032o\0035l\0031/g;
	$ptr =~ s/hihi/\0035h\0032i\0035h\0032i\0031/g;
	$ptr =~ s/doof/\0035d\0032OO\0035v\0031/g;
      Xchat::command("say $ptr");
}
elsif($fun_look == "2") 
  {
	$ptr =~ s/;\)/\0032\002;\002\0039)\0031/g;
	$ptr =~ s/:\)/\0032\002:\002\0039)\0031/g;
	$ptr =~ s/:P/\0032\002:\002\0035P\0031/g;
	$ptr =~ s/:D/\0032\002:\002\0039D\0031/g;
	$ptr =~ s/xD/\0032\002x\002\0039D\0031/g;
	$ptr =~ s/:\]/\0032\002:\002\0039]\0031/g;
	$ptr =~ s/:\(/\0032\002:\002\0039(\0031/g;
	$ptr =~ s/:\|/\0032\002:\002\0039|\0031/g;
	$ptr =~ s/\*/\0032\002*\002\0031/g;
	$ptr =~ s/\^\^/\0032^^\0031/g;
	$ptr =~ s/huhu/\0032h\0039\002u\002\0032h\0039\002u...\002\0031/g;
	$ptr =~ s/hehe/\0032h\0039\002e\002\0032h\0039\002e...\002\0031/g;
	$ptr =~ s/lol/\0032l\0039\002a\002\0032l\0031/g;
	$ptr =~ s/hihi/\0032h\0039\002i\002\0032h\0039\002i...\002\0031/g;
	$ptr =~ s/doof/\0032d\0039\002OO\002\0032v\0031/g;
     Xchat::command("say $ptr");

}

elsif($fun_look eq "3")
  {
	$ptr =~ s/;\)/\0030;\0032\002)\0031/g;
	$ptr =~ s/:\)/\0030:\0032\002)\0031/g;
	$ptr =~ s/:P/\0030:\0035P\0031/g;
	$ptr =~ s/:D/\0030:\0032\002D\0031/g;
	$ptr =~ s/xD/\0030x\0032\002D\0031/g;
	$ptr =~ s/:\]/\0030:\0032\002]\0031/g;
	$ptr =~ s/:\(/\0030:\0032\002(\0031/g;
	$ptr =~ s/:\|/\0030:\0032\002|\0031/g;
	$ptr =~ s/\*/\0030*\0031/g;
	$ptr =~ s/\^\^/\0030^^\0031/g;
	$ptr =~ s/huhu/\0030h\0032\002u\0030h\0032\002\002u...\002\0031/g;
	$ptr =~ s/hehe/\0030h\0032\002e\0030h\0032\002\002e...\002\0031/g;
	$ptr =~ s/lol/\0030l\0032\002a\0030l\0031/g;
	$ptr =~ s/hihi/\0030h\0032\002i\0030h\0032\002\002i...\002\0031/g;
	$ptr =~ s/doof/\0030d\0032\002OO\0030v\0031/g;
      Xchat::command("say $ptr");
}
elsif($fun_look eq "0")
  {
      Xchat::command("say $ptr");
  }

}


sub fun_do_toogle_colorize {

  $arg = $_[0][1];
unless($arg)
  {
	iprint("Keine Ziffer (0-3) angegeben");
  }

if($arg eq "0")
  {
	  $fun_look = "0";
	iprint("Das Fun Look Thema wurde auf 0 (keine Farbe) umgestellt");
  }
if($arg eq "1")
  {
	  $fun_look = "1";
	iprint("Das Fun Look Thema wurde auf 1 (blau rot) umgestellt");
  }
if($arg eq "2")
  {
	  $fun_look = "2";
	iprint("Das Fun Look Thema wurde auf 2 (blau hellgrÃ¼n) umgestellt");
  }
if($arg eq "3")
  {
	  $fun_look = "3";
	iprint(" Das Fun Look Thema wurde auf 3 (blau hellgrau) umgestellt");
  }

}


sub fun_do_miez {

	Xchat::command("say \0031,38*Holt eine Dose Scheba aus dem Ã„rmel*\0031,0");
	Xchat::command("/me Miez Miez Miez... Ja wo ist den das kleine $_[0][1] ? ");
return 1;
}


sub fun_do_jesus {
  $nick = $_[0][1];
	Xchat::command("hÃ¤ngt sein Kreuz von der Wand ab und schiebt es $nick in den After");
	Xchat::command("    \002<<< FUCK ME JESUS >>>\002");
return 1;
}


sub fun_do_leet {

  $ptr = $_[1][1];

  $ptr =~ s/e/3/g;
  $ptr =~ s/t/7/g;
  $ptr =~ s/i/!/g;
  $ptr =~ s/l/1/g;
  $ptr =~ s/o/0/g;
  $ptr =~ s/s/5/g;
	Xchat::command("say $ptr");
return 1;
}

sub fun_do_leet_toogle {

  $arg = $_[0][1];

if($arg eq "on")
  {
	  $fun_toogle_leet ="1";
	iprint("leet Script eingeschaltet");
  }
else 
  {
	  $fun_toogle_leet = "0";
	iprint("leet Script ausgeschaltet");
  }
}

sub fun_do_flame {

  $nick = $_[0][1];

	Xchat::command("/me \0031holt seinen Flamethrower aus der Tasche und \002\0035brennt\0031\002 $nick die Haare weg");
	Xchat::command("MIST !!!");
	Xchat::command("/me \0031zielt noch mal richtig auf $nick und verwandelt ihn ein kleines HÃ¤ufchen Asche *\0035WRAMMM\0031*");
	Xchat::command("*\002CHHHRRRRRR\002*");
	Xchat::command("Ab in die MÃ¼lltonne mit dir");
return 1;
}


sub fun_do_klau {

  $nick = $_[0][1];
	Xchat::command("/me klaut $nick seine Cookies");
	Xchat::command("*SCHMATZ*");
	Xchat::command(":P");
	Xchat::command("Die Waren eh zu gut fÃ¼r dich ");
return 1;
}

sub fun_do_hammer {

  $nick = $_[0][1];
	Xchat::command("/me haut $nick mit einem Hammer \0031,30  ---\0031,31[]\0039,30 !!  BÃ„Ã„Ã„NNGG !! \0031,31[]\0031,30---  ");
return 1;
}

sub fun_skill {

  $arg1 = $_[0];
  my $skill;

if($arg1 eq "low-" || $arg1 eq "0")
  {
	  $skill = "low-";
  }
elsif($arg1 eq "low" || $arg1 eq "1")
  {
	  $skill = "low";
  }
elsif($arg1 eq "low+" || $arg1 eq "2") 
  {
	  $skill = "low+";
  }
elsif($arg1 eq "med-" || $arg1 eq "3")
  {
	  $skill = "med-";
  }
elsif($arg1 eq "med" || $arg1 eq "4")
  {
	  $skill = "med";
  }
elsif($arg1 eq "med+" || $arg1 eq "5")
  {
	  $skill = "med+";
  }
elsif($arg1 eq "high" || $arg1 eq "0")
  {
	  $skill = "skilled";
  }
return $skill;

}

sub fun_srv {

  $arg2 = $_[0];
  my $srv;

if($arg2 eq "no")
  {
	  $srv = "nosrv";
  }
else
  {

	  $srv = "hvsrv";
  }

return $srv;

}


sub fun_do_3on3 {
 
  $arg1 = $_[0][1];
  $arg2 = $_[0][2];
  $skill = fun_skill($arg1);
  $srv   = fun_srv($arg2);

foreach(@fun_3on3)
  {
	Xchat::command("say \002Search\002 $skill 3on3 $srv \002now\002 qry \002!!!\002",$_);
  }

}

sub fun_do_4on4 {

  $arg1 = $_[0][1];
  $arg2 = $_[0][2];
  $skill = fun_skill($arg1);
  $srv   = fun_srv($arg2);

foreach(@fun_4on4)
  {
	Xchat::command("say \002Search\002 $skill 4on4 $srv \002now\002 qry \002!!!\002",$_);
  }
}

sub fun_do_5on5 {

  $arg1 = $_[0][1];
  $arg2 = $_[0][2];
  $skill = fun_skill($arg1);
  $srv   = fun_srv($arg2);

foreach(@fun_5on5)
  {
	Xchat::command("say \002Search\002 $skill 5on5 $srv \002now\002 qry \002!!!\002",$_);
  }
}

sub fun_do_6on6 {

  $arg1 = $_[0][1];
  $arg2 = $_[0][2];
  $skill = fun_skill($arg1);
  $srv   = fun_srv($arg2);

foreach(@fun_6on6)
  {
	Xchat::command("say \002Search\002 $skill 6on6 $srv \002now\002 qry \002!!!\002",$_);
  }
}

sub fun_do_xqf_return {

if($fun_nowplaying)
  {
	xprint("Welcome back.....xD");

	if(-e $fun_xqf_launch_file)
	  {
 		unlink $fun_xqf_launch_file 
          }

	Xchat::hook_timer($fun_xqf_launch_timer,fun_xqf_launch_check);

	  $fun_nowplaying = 0;

	Xchat::command("nick $fun_nick_on");
	Xchat::command("away");
	}
else 
	{
		xprint("Du spielst doch garnicht du Hugo");
	}
}

#### ANKER 1
sub fun_xqf_launch_check {
if ( !-e $fun_xqf_launch_file ) 
	{
	if($DEBUG){
	dprint(" Anker1: XQF: Kein Launchfile gefunden");
	}
	Xchat::hook_timer($fun_xqf_launch_timer,fun_xqf_launch_check);
	}
else
	{

	if($fun_xqf_toogle eq "1") {

		open(LF,$fun_xqf_launch_file);
		while (<LF>)
			{
	
			if(/GameType\s+(.*)/)
			{
				$fun_srv_gametype1 = $1;
			}
			elsif(/ServerName\s+(.*)/)
			{
				$fun_srv_name = $1;
			}
			elsif(/ServerAddr\s+(.*)/)
			{
				$fun_srv_addr = $1;
			}
			elsif(/ServerMod\s+(.*),/)
			{
				$fun_srv_mod = $1;
			}
		
}
		close(LF);
if($DEBUG){
	dprint(" Anker1: XQF: bekomme srv daten:  srv_agmetyp1 =>$fun_srv_gametype1   name => $fun_srv_name  addr=> $fun_srv_addr  mod =>$fun_srv_mod ");
	}
		  $fun_srv_gametype = fun_get_game($fun_srv_gametype1,$fun_srv_mod);
if($DEBUG){
	dprint(" Anker1: XQF: bekomme srv daten:  gametype=> $fun_srv_gametype");
	}

		foreach(@fun_xqf_channels)
		{
if($DEBUG){
	dprint(" Anker1: XQF: Ausgabe in jeweiligen Chan");
	}
			Xchat::command("me is now playing $fun_srv_gametype on srv $fun_srv_name($fun_srv_addr)...",$_);
		}
if($DEBUG){
	dprint(" Anker1: XQF: Entere return display");
	}
		  xprint("Hf und gl beim zoggn :)) ");
xprint("um wieder zurÃ¼ck zu kehren gib \0035 /return \0031oder \0035/re \0033 !!! ");
xprint("um wieder zurÃ¼ck zu kehren gib \0035 /return \0031oder \0035/re \0033 !!! ");
xprint("um wieder zurÃ¼ck zu kehren gib \0035 /return \0031oder \0035/re \0033 !!! ");
		  $fun_nowplaying = 1;
		if($fun_allow_name_change)
		{
	if($DEBUG){
	dprint(" Anker1: XQF: name_change....");
	}
 			fun_xqf_name_change($fun_game_name);
		}
	}
}
return 0;
}

sub fun_xqf_name_change {
$fun_game_name = $_[0];

if($fun_game_name eq "et")
	{
	Xchat::command("nick $fun_nick_et");
	Xchat::command("away ..... joogi spiel *rattter rattter* et :> ....");
	$fun_afk_status = 1;
	}
if($fun_game_name eq "q3")
	{
	Xchat::command("nick $fun_nick_q3");
	Xchat::command("away ..... joogi is daddeling *fizz* q3 xD ....");
	$fun_afk_status = 1;
	}
}

sub fun_get_game {

$fun_srv_gametype1 = $_[0];
$fun_srv_srv_mod = $_[1];

if($fun_srv_gametype1 eq "Quake3: Arena")
	{
	$fun_game_name = "q3";
	
	if($fun_srv_gametype1 eq "Quake3: Arena" && $fun_srv_mod eq "arena")
	{
		$fun_srv_gametype = "RA3";
	}

	elsif($fun_srv_gametype1 eq "Quake3: Arena" && $fun_srv_mod eq "osp")
	{
		$fun_srv_gametype = "Q3-osp";
	}
	elsif($fun_srv_gametype1 eq "Quake3: Arena" && $fun_srv_mod eq "defrag")
	{
		$fun_srv_gametype = "Q3-defRag";
	}
}

if($fun_srv_gametype1 eq "Enemy Territory")
	{
	$fun_game_name = "et";
	
	if($fun_srv_gametype1 eq "Enemy Territory" && $fun_srv_mod eq "etpro")
	{
		$fun_srv_gametype = "ET-Pro";
	}
	elsif($fun_srv_gametype1 eq "Enemy Territory" && $fun_srv_mod eq "etpub")
	{
		$fun_srv_gametype = "ET-etpuB";
	}
	elsif($fun_srv_gametype1 eq "Enemy Territory" && $fun_srv_mod eq "jaymod")
	{
		$fun_srv_gametype = "ET-jaYmoD";
	}
}
if($DEBUG2){
dprint(" gametype fÃ¼r change ist => $fun_game_name");
}
return $fun_srv_gametype;
}

sub fun_do_xqf_toogle {

  $arg = $_[0][1];

if($arg eq "on" || $arg eq "1")
  {
	  $fun_xqf_toogle ="1";
	iprint("XQF Server Script eingeschaltet");
  }
else
  {
	  $fun_xqf_toogle = "0";
	iprint("XQF Server Script ist ausgeschaltet");
  }
}

sub fun_do_ama_song {

  $amarok_status = check_ama();
 
if($amarok_status)
  {
	
	  $fun_ama_play = `dcop amarok default isPlaying`;
	chomp($fun_ama_play);

	if($fun_ama_play eq "false")
	  {
		Xchat::command("me ist zu blÃ¶d zu kapieren das sein amaroK nichts abspielt ...");
	  }
	else
	  {
		  $fun_ama_titel = get_ama("title");	
		  $fun_ama_inter = get_ama("artist");
		  $fun_ama_album = get_ama("album");
		  $fun_ama_time_song = get_ama("trackTotalTime");
		  $fun_ama_time_you = get_ama("trackCurrentTime");
		  $fun_ama_sample = get_ama("sampleRate");
		chomp($fun_ama_titel);
		chomp($fun_ama_inter);
		chomp($fun_ama_album);
		chomp($fun_ama_time_song);
		chomp($fun_ama_time_you);
		chomp($fun_ama_sample);
		if($DEBUG3)
	 	  {
			dprint("fun_ama_titel = $fun_ama_titel\nfun_ama_inter = $fun_ama_inter\nfun_ama_album = $fun_ama_album\nfun_ama_time_song = 		$fun_ama_time_song\nfun_ama_time_you = $fun_ama_time_you\nfun_ama_sample = $fun_ama_sample\n");
		  }
		  $fun_minutes_total = ($fun_ama_time_song/60)%60;
		  $fun_seconds_total = $fun_ama_time_song%60;
	  	if ($fun_seconds_total < 10)
		  {
			  $fun_seconds_total = "0" . $secondstotal;
		  }
		  $fun_minutes_you = ($fun_ama_time_you/60)%60;
		  $fun_seconds_you = $fun_ama_time_you%60;
		if ($fun_seconds_you < 10)
		  {
			  $fun_seconds_you = "0" . $fun_seconds_you;
		  }
		  $fun_sample = $fun_ama_sample/1000;

		Xchat::command("me \0032is listens to \002$fun_ama_inter \002\0038-\0032\002 $fun_ama_titel\002\0038 (\0032 ".$fun_minutes_you."\002min\002 ".$fun_seconds_you."\002sec\002\002\0038 from\002\0032 ".$fun_minutes_total."\002min\002 ".$fun_seconds_total."\002sec\002 \0038\002|\002\0032 @".$fun_sample." kB/sec\002\0038)\0031");

	  }
  }
}


sub fun_do_ama_pause {

  $amarok_status = check_ama();

if($amarok_status){
$pause= get_ama("pause");
aprint("\002||\002--Pause--\002||\002");
}
}

sub fun_do_ama_stop {
  $amarok_status = check_ama();

if($amarok_status)
  {
	  $stop= get_ama("stop");
	aprint("#---Stop---#");
  }
}

sub fun_do_ama_next{
  $amarok_status = check_ama();

if($amarok_status)
  {
	  $next= get_ama("next");
	aprint("----NEXT--Â»Â»");
  }
}

sub fun_do_ama_prev{ 
  $amarok_status = check_ama();

if($amarok_status)
  {
	  $prev = get_ama("prev");
	aprint("Â«Â«--PREV----");
  }
}

sub fun_do_ama_play{
  $amarok_status = check_ama();

if($amarok_status)
  {
	  $play = get_ama("play");
	aprint("Â«Â«--Play--Â»Â»");
  }
}

sub fun_do_ama_mount{

  $arg1 = $_[0][1];
  $amarok_status = check_ama();

if($amarok_status)
  {
	if($arg1 eq "mount")
	  {
		  $mount = get_ama("mediaDeviceMount");
		aprint("Media Device wird gemounted....");
	  }
	if($arg1 eq "umount")
	  {
		  $umount = get_ama("mediaDeviceUmount");
		aprint("Media Device wir ungemounted....");
	  }
  }

}

sub fun_do_ama_vol {

  $amarok_status = check_ama();
  $arg = $_[0][1];
  $arg2 =$_[0][2];
if($amarok_status)
	{

	if($arg eq "+" || $arg eq "1") 
		{
		if($arg2 > "0" && $arg2 < "10")
			{
			for($x=0;$x<=$arg2;$x++)
				{
				$volp = get_ama("volumeUp","$x");
				}
			aprint("---volUme Up (+$arg2)---");
			}
		else
			{
			aprint("Volumen regeln mit Zahlen zwischen 1-10");
			}
		}
	elsif($arg eq "-" || $arg eq "2")
		{
		if($arg2 > "0" && $arg2 < "10")
			{
			for($x=0;$x<=$arg2;$x++)
				{
				$volp = get_ama("volumeDown","$x");
				}
			aprint("---volUme Down (-$arg2)---");
			}
		else
			{
			aprint("Volumen regeln mit Zahlen zwischen 1-10");
			}
		}
	else
		{
		aprint(" Volumenregler: syntax  /avol (+|-) (1-10)  erstes gibt an ob up oder down zweites wieviel");
		}
	}
}

sub fun_do_ama_mute {

  $amarok_status = check_ama();

if($amarok_status)
  {
	  $mute = get_ama("mute");
	aprint("xx--Mute--xx");
  }
}
sub fun_do_ama_playlist {


$num = $fun_ama_max_songs;
$sts = `dcop amarok default isPlaying`;
$amarok = `dcop amarok playlist saveCurrentPlaylist`;
$amarok_cur_title = `dcop amarok default title`;
if($sts == "true"){
$status = 1;
}
else {
$status = 0;
}


if( -e $fun_ama_current_file ){
}
else {
eprint("current.xml: file ist nicht vorhanden");
}
open(PL,$fun_ama_current_file);
$index = 0;
$isitem = 0;
$now_playing_song = 0;
while(<PL>)
{
 $zeile = $_;
 if(m/<item url=(.*)/gi)
	{
	$url[$index] = $1;
	$isitem = 1;
	}
 if(m/<item queue_index="0" url=(.*)/gi){
	$url[$index] = $1;
	$isitem = 1;
	$now_playing_song = $index;
}
 if($isitem eq "1")
	{
	if(/<Title>(.*)<\/Title>/gi)
		{
		$song[$index] = $1;
		
		}
	if(/<Artist>(.*)<\/Artist>/gi)
		{
		$song_artist[$index] = $1;
		}
	if(/<Rating>(.*)<\/Rating>/gi)
		{
		$song_rating[$index] = $1;
		}
	}
 if(m/<\/item>/gi)
	{
	$isitem = 0;
	$index++;
	}
}


close(PL);
Xchat::print(" \0032-----\0033----------\002\0032[\002\0033 Naechsten $fun_ama_max_songs Songs \0032\002]\002\0032------\0039---------\0039Â»\0033Â»\0032Â»\n");
for($xx = $now_playing_song;$xx<$index-1;$xx++)
			{
			if($xx <= ($num + $now_playing_song - 1))
				{
				if($status)
					{
					plprint("$song_artist[$xx]","$song[$xx]","$song_rating[$xx]","$xx plY");
					$status = 0;
					}
				else
					{
					plprint("$song_artist[$xx]","$song[$xx]","$song_rating[$xx]","$xx");
					}
				}
			}


Xchat::print(" \0032-----\0033---------------------------\00390-------------------Â»\0033Â»\0032Â» \n");
}

sub get_ama {

  $arg = $_[0];
  $replay = `dcop amarok default $arg`;

return $replay;

}

sub check_ama {

 $amarok=qx'dcop amarok';
 
if(length($amarok) > 1)
  {
	return 1;
  }
else
  {
	eprint("Du Hugo schalt deinen amaroK auch ein wenn du das script benutzen willst");
	return 0;
  }

}


# Aus der alten Version Ã¼bernommen ... (joogi-script 0.1)
sub fun_do_cpu {

  my $cpu_model;
  my $cpu_mhz;
  my $cpu_bogomips;

open (X, "/proc/cpuinfo");
  while (<X>) {
	if(/^model name.*: (.*)/g) {
		$cpu_model = "\0032C\0033pu \0032T\0033ype\0032      : \0033".$1;
		}
 	elsif (!$cpu_mhz && /^cpu MHz.*: (.*)\n$/) {
		$cpu_mhz = "\0032C\0033pu \0032S\0033peed\0032     :\0033 ".$1." Mhz";
		}
	elsif (/^bogomips.*: (.*)\n$/i) {
		$cpu_bogomips = "\0032C\0033pu \0032B\0033ogomips  \0032:\0033 ".$1." bogomips";;
		}
  }
close(X);
Xchat::command("say \0039\| \0032--\002[\002\0033 CpU \002\0032]\002\0033-------\0039--------");
Xchat::command("say \0039\| $cpu_model");
Xchat::command("say \0039\| $cpu_mhz");
Xchat::command("say \0039\| $cpu_bogomips");
return 1;
}
# Aus der alten Version Ã¼bernommen ...[Bug fixed] (joogi-script 0.1)
sub fun_do_mem {
open (X, "/proc/meminfo");
  while (<X>) {
		if(/^MemTotal:\s+(\d+)/){
			$mem_total1 = $1;
		}
		elsif(/^MemFree:\s+(\d+)/){
			$mem_free1 = $1;
		}
		elsif(/^Buffers:\s+ (\d+)/){
			$mem_free1 += $1;
		}
		elsif(/^Cached:\s+ (\d+)/){
			$mem_free1 += $1;
		}

}
close(X);
  my $mem_total = sprintf("%.2f",$mem_total1/1024);
  my $mem_percent = sprintf("%.2f",($mem_total1 - $mem_free1) / ($mem_total1/100));

if($debug)
  {
	Xchat::command("say sub_mem (DEBUG):     mem_percent: $mem_percent");
  }
  my $mem_free2 = sprintf("%.2f",($mem_total - $mem_free1/1024));
  my $mem_p = sprintf("%.0f",$mem_percent/10);
  my $mem_bar_1 ="\0032,30\002[";
  my $mem_bar_2;
  my $x;
for($x=0;$x < $mem_p;$x++)
  {
	$mem_bar_1 .= "\0035|";
  }	
for($xx = 0;$xx <(10-$mem_p);$xx++)
  {
	$mem_bar_1 .= "\0033|";
  }

  $mem_bar = $mem_bar_1."\0032]\002";

	Xchat::command("say \0039\| \0032--\002[\002\0033 RaM \002\0032]\002\0033-------\0039--------");
	Xchat::command("say \0039\| \0032R\0033am \0032T\0033otal\t\t\t\t\t\0032:\0033 ".$mem_total." MB");
	Xchat::command("say \0039\| \0032R\0033am \0032U\0033sed\t\t\t\t\t \0032:\0033 ".$mem_free2." MB  ".$mem_bar);

return ;

}

sub fun_do_cards {

open (X, "/proc/driver/nvidia/cards/0");
  while (<X>) {
	if(/Model:\s+(.*)/){
			$vga_name = $1;
			chomp($vga_name);
		}
		elsif(/Video BIOS:\s+(.*)/){
			$vga_bios = $1;
		}
		elsif(/Card Type:\s+(.*)/){
			$vga_slot = $1;
		}
		
}
close(X);
# Ugly ich weiÃŸ muss auch noch Ati rein :/
if($vga_slot=="PCI-E")
  {
$vga_slot="PCIexpress 16x";
  }
	Xchat::command("say \0039\| \0032--\002[\002\0033 CardS \002\0032]\002\0033-------\0039--------");

  $card_wlan = `lspci -v | grep 'Network controller:' | sed 's/.*: //' | sed 's/(.*//'`; chomp($card_wlan);
  $card_lan = `lspci -v | grep 'Ethernet controller:' | sed 's/.*: //' | sed 's/(.*//'`; chomp($card_lan);
  $card_sound = `lspci -v | grep 'Multimedia audio controller:' | sed 's/.*: //' | sed 's/(.*//'`; chomp($card_sound);
  my $fun_card_wlan 		= "\0039\| \0032W\0033lan \0032A\0033dapter\t\t\0032:\0033 $card_wlan";
  my $fun_card_lan 		= "\0039\| \0032L\0033an \0032A\0033dapter\t\t\t\0032:\0033 $card_lan";
  my $fun_card_sound  	= "\0039\| \0032S\0033ound \0032C\0033ard\t\t\t\t\0032:\0033 $card_sound";
  my $fun_card_header 	= "\0039\|  \0032--\002[\002\0033 GraPhiC CarD \002\0032]\002\0033-------\0039--------";
  my $fun_card_vga_name 	= "\0039\|\0033| \0032V\0033ga \0032C\0033ard\t\t\t\t\t\0032:\0033 $vga_name"; 
  my $fun_card_vga_bios 	= "\0039\|\0033| \0032B\0033ios \0032V\0033ersion\t\0032:\0033 $vga_bios";
  my $fun_card_vga_slot 	= "\0039\|\0033| \0032C\0033oard \0032S\0033lot\t\t\t\0032:\0033 $vga_slot";
  my $fun_card_footer 	= "\0039\|  \0032-----------------\0033-------\0039--------";

	Xchat::command("say $fun_card_wlan");
	Xchat::command("say $fun_card_lan");
	Xchat::command("say $fun_card_sound");
	Xchat::command("say $fun_card_header");
	Xchat::command("say $fun_card_vga_name");
	Xchat::command("say $fun_card_vga_bios");
	Xchat::command("say $fun_card_vga_slot");
	Xchat::command("say $fun_card_footer");

return ;

}


sub fun_do_uptime {

  $cmd_uptime = `uptime`;
  $line_uptime = $cmd_uptime;

if($line_uptime =~ /up\s+(\d+)\:(\d+)/)
  {
	  $line_h = $1;
	  $line_min = $2;
	  $line = "$line_h Stunden $line_min Minuten";
 
	return $line;
  }

elsif($line_uptime =~ /up\s+(\d+)\s+day\s+(\d+)\:(\d+)/)
  {
	  $line_d = $1;
	  $line_h = $2;
	  $line_min = $3;
	  $line = "$line_d Tage $line_h Stunden $line_min Minuten";

	return $line;
  }

else
  {
	eprint("Ka... die scheiÃŸ uptime ausgabe kann so viele verschiedene varianten annehmen *grml*");

	return undef;
  }

}

sub fun_do_distro {

	my $distro;
	if(-f "/etc/coas")
	{
		$distro = firstline("/etc/coas");
	}
	elsif(-f "/etc/environment.corel")
	{
		$distro = firstline("/etc/environment.corel");
	}
	elsif((-f "/etc/debian_version") && (-f "/etc/lsb-release"))
	{
		$distro = $distro = "Debian ".firstline("/etc/debian_version")." - Ubuntu ";
	}
	elsif( (-f "/etc/debian_version") && (-f "/etc/kanotix-version") )
	{
		$distro = "Debian ".firstline("/etc/debian_version")." - Kanotix ";
	}
	elsif ( (-f "/etc/knoppix-version") && (-f "/etc/debian_version") )
	{
		$distro = "Debian ".firstline("/etc/debian_version")." - Knoppix ";
	}
	elsif( (-f "/etc/debian_version") && !(-f "/etc/kanotix-version") && !(-f "/etc/knoppix-version")  )
	{
		$distro = "Debian ".firstline("/etc/debian_version");
	}
	elsif(-f "/etc/mandrake-release")
	{
		$distro = firstline("/etc/mandrake-release");
	}
	elsif(-f "/etc/SuSE-release")
	{
		$distro = firstline("/etc/SuSE-release");
	}
	elsif(-f "/etc/turbolinux-release")
	{
		$distro = firstline("/etc/turbolinux-release");
	}
	elsif(-f "/etc/slackware-release")
	{
		$distro = firstline("/etc/slackware-release");
	}
	elsif(-f "/etc/redhat-release")
	{
		$distro = firstline("/etc/redhat-release");
	}
	elsif(-f "/etc/gentoo-release")
	{
		$distro = firstline("/etc/gentoo-release");
	}
	return $distro;
}

sub fun_do_sysinfo {

  $kernel = `uname -srm`;
	chop($kernel);

	return $kernel;
}


sub firstline
{
  my $file = shift;
	open(FILE, "$file") or return undef;
	chomp(my $line = <FILE>);
	close(FILE);

	return $line;
}


sub fun_do_dist {

  $dist_linux	= fun_do_distro();
  $dist_kernel	= fun_do_sysinfo();
  $dist_up	= fun_do_uptime();
  my $fun_dist_linux	= "\0039\| \0032L\0033inux \0032D\0033isT\t\t\t\t\0032:\0033 $dist_linux";
  my $fun_dist_kernel	= "\0039\| \0032L\0033inux \0032K\0033ernel\t\t\0032:\0033 $dist_kernel";
  my $fun_dist_uptime	= "\0039\| \0032S\0033ystem \0032U\0033ptime\t\0032:\0033 $dist_up";

	Xchat::command("say \0039\| \0032--\002[\002\0033 DisT \002\0032]\002\0033-------\0039--------");
	Xchat::command("say $fun_dist_linux");
	Xchat::command("say $fun_dist_kernel");
	Xchat::command("say $fun_dist_uptime");
}

sub fun_do_pcstats {

	Xchat::command("say 12—00O"); #30 mal Minus
  $dist = fun_do_dist();
  $cpu = fun_do_cpu();
  $mem = fun_do_mem();
  $cards = fun_do_cards();
}

sub fun_read_list(){
$arg = $_[0];
if($arg eq "allow")
	{
	if(-e $fun_qb_allowfile)
		{
		open(BF,$fun_qb_allowfile);
		@allowlistt = (<BF>);
		foreach (@allowlistt)
			{
			chomp($_);
			push(@allowlist,$_);
			}
		close(BF);
		if($qbf)
			{
			iprint("Allowliste gefunden und erfolgreich geladen...");
			$qbf = 1;
			}
		}
	else
		{
		open(BF,">$fun_qb_allowfile");
		close(BF);
		fun_read_list('allow');
		eprint("Keine Allowliste gefunden....neu angelegt");
		$qbf = 0;
		}
	}
elsif($arg eq "block")
	{
	if(-e $fun_qb_blockfile)
		{
		
		open(BF,$fun_qb_blockfile);
		@blocklistt = (<BF>);
		foreach (@blocklistt)
			{
			chomp($_);
			push(@ignorelist,$_);
			}
		close(BF);
		if($qbf)
			{
			iprint("Blockliste gefunden und erfolgreich geladen...");
			$qbf = 1;
			}
		}
	else
		{
		open(BF,">$fun_qb_blockfile");
		close(BF);
		fun_read_list('block');
		eprint("Keine Blockliste gefunden....neu angelegt");
		$qbf = 0;
		}
	}

}


sub fun_check_user{
$usr = $_[0];
my $status_usr = 0;
foreach (@allowlist){
	if($_ eq $usr){
		$status_usr = 1;
		}
	}
if($status_usr == 0){
 foreach (@templist)
	{
	if($_ eq $usr)
		{
		$status_usr = 1;
		}
	}
}
return $status_usr;
}
	


	
sub fun_qb_handler{
		
		
		my $qry = $_[0][0];
		my $text = $_[0][1];
		my $srv = Xchat::get_info('server');
		my $net = Xchat::get_info('network');
		my $current_nick = ( IRC::get_info(1) );

if($fun_qb_status)
	{
	if($fun_qb_mod eq "1")
		{
		if(fun_check_user($qry) eq "1")
			{
			
			}
		else 
			{
			Xchat::command("msg $qry \0033H\0032i, \0033D\0032u stehst nicht auf der Allow Liste des \0033Q\0032ueryblockers, pls wait ich frage meinen \0033H\0032erren $current_nick ob er mit dir reden will *hrhrhr* ");
			notify_self($qry,$text,"normal");
			$current_qry = $qry;
			Xchat::command('close');
		
			}
				
		
		}


	elsif($fun_qb_mod eq "2")
			{
			if(&check_nick("qry",$qry) eq "0")
				{
				if(&check_nick("block",$qry) eq "0"){
					if(&check_nick("ignore",$qry) eq "0" )
						{

						if(&check_nick("start",$qry) eq "0")
							{
							notify_self($qry,$text,"normal");
							Xchat::command("msg $qry \0033H\0032i\0033H\0032o du willst ein Qry mit $current_nick anfangen aber $current_nick verlangt ein pw von dir ");
							Xchat::command("msg $qry \0032B\0033efehle:");
							Xchat::command("msg $qry \0035!pass\0033 <passwort>  - \0032W\0033enn du das \0032P\0033asswort eingeben willst");
							Xchat::command("msg $qry \0035!nopw\0033 <text>      - \0032W\0033enn du das \0032P\0033asswort nicht weist und \0032t\0033rotzdem was von $current_nick willst");
							Xchat::command("msg $qry \0035!woot\0033             - \0032W\0033enn dir der ganze \0032S\0033hit auf die \0032E\0033ier geht... xD");
							add_nick("start",$qry);
							
							
							}
						if($text =~ /!pass\s+(.*)/m)
							{
							$pw = $1;
							if($pw eq $fun_qb_pw)
								{
								Xchat::command("msg $qry \0032Q\0033uery \0032A\0033kzeptiert......\0039.\0032.");
								add_nick("qry",$qry);
								}
							else 
								{
								if($pw_versuche > 0)
									{
									Xchat::command("msg $qry \0032P\0033asswort \0035falsch\0033....Noch $pw_versuche Versuche");
									$pw_versuche--;
									}
								else
									{
									Xchat::command("msg $qry \0032D\0033u Naab... bist ab nun ingored....");
									add_nick("ignore",$qry);
									notify_self($qry,$text,"ignore");
									}
					
						
								}
							}
						if($text =~ /!nopw\s+(.*)/m || $text =~ /!nopw/m)
							{
							$text = $1;
							notify_self($qry,$text,"passwort");
							Xchat::command("msg $qry \0032D\0033eine Bitte und \0032G\0033ewinnsel wurde an $current_nick gesandt :)....");	
							$current_qry = $qry;
							}
						if($text =~ /!woot/m){
						notify_self($qry,$text,"woot");
						Xchat::command("msg $qry me slaps $qry with a large gummi hammer");
						Xchat::command("msg $qry \0032D\0033u Nudel... woooot....*schnaub*.-,..-.");
						}
						
						Xchat::command('close');
						}

					}
				}	
			}



	}
}	 


sub check_nick{
$arg = $_[0];
$nick = $_[1];
if($arg eq "ignore"){
foreach (@ignorelist)
	{
	if($nick eq $_){
		return 1;
		}
}
}

if($arg eq "block"){
foreach (@blocklist)
	{
	if($nick eq $_){
		return 1;
		}
}
}


elsif($arg eq "start"){
foreach (@startlist){
	if($nick eq $_){
	return 1;
	}
}
}
elsif($arg eq "qry"){
$result =fun_check_user($nick);
if($result){
	return 1;
	}
}
return 0;
}

sub add_nick{
$arg = $_[0];
$nick = $_[1];
if($arg eq "ignore"){
foreach (@ingorelist){
	if($_ eq $nick){
		return 0;
	}
}
push(@ignorelist, $nick);
$pw_versuche = 3;
}

if($arg eq "block"){
foreach (@blocklist){
	if($_ eq $nick){
		return 0;
	}
}
push(@blocklist, $nick);
fun_save_list();
}

elsif($arg eq "start"){
foreach (@startlist){
	if($_ eq $nick){
		return 0;
	}
}
push(@startlist, $nick);
}
elsif($arg eq "qry"){
foreach (@templist){
	if($_ eq $nick){
		return 0;
	}
}
push(@templist, $nick);
}
elsif($arg eq "allow"){
foreach (@allowlist){
	if($_ eq $nick){
		return 0;
	}
}
push(@allowlist, $nick);
fun_save_list();;
}
}

sub del_nick{
$arg = $_[0];
$nick = $_[1];
if($arg eq "ignore"){
if(&check_nick("ignore",$qry) eq "0"){
@ignorelist = grep{$_ ne "$nick"} @ignorelist;
}
else {
return -1;
}	
}

if($arg eq "block"){
if(&check_nick("block",$qry) eq "0"){
@blocklist = grep{$_ ne "$nick"} @blocklist;
fun_save_list();
}
else {
return -1;
}	
}

elsif($arg eq "start"){
if(&check_nick("start",$qry) eq "0"){
@startlist = grep{$_ ne "$nick"} @startlist;
}
else {
return -1;
}	
}
elsif($arg eq "qry"){
if(&check_nick("qry",$qry) eq "0"){
@templist = grep{$_ ne "$nick"} @templist;
}
else {
return -1;
}	

 }
elsif($arg eq "allow"){
if(&check_nick("allow",$qry) eq "0"){
@allowlist = grep{$_ ne "$nick"} @allowlist;
fun_save_list();
}
else {
return -1;
}		
}	
}

sub notify_self{
$nick = $_[0];
$text = $_[1];
$mode = $_[2];
@channels = Xchat::get_list('channels');
if($mode eq "normal"){
foreach $channel(@channels){
$chan = $channel->{'channel'};
Xchat::print("\0032<\0033<\0039<-----\0035\002 $nick\002\0033 will ein \002querY\002 mit dir: \002(\002$text\002)\002\0039 ----->\0033>\0032>\n",$chan);
}
}
elsif($mode eq "passwort"){
foreach $channel(@channels){
$chan = $channel->{'channel'};
Xchat::print("\003<\0033<\0039<-----\0035\002 $nick\002\0033 will ein \002querY\002 mit dir und weiss das pw nicht !!! \002(\002$text\002)\002\0039 ----->\0033>\0032>\n",$chan);
}
}
elsif($mode eq "ignore"){
foreach $channel(@channels){
$chan = $channel->{'channel'};
Xchat::print("\0032<\0033<\0039<-----\0035\002 $nick\002\0033 hat das pw \0023 mal Falsch\002 eingegeben \002(\002er wird ab nun ignoriert [for unignore type /del ignore <nick>]\002)\002\0039 ----->\0033>\0032>\n",$chan);
}
}
elsif($mode eq "woot"){
foreach $channel(@channels){
$chan = $channel->{'channel'};
Xchat::print("\0032<\0033<\0039<-----\0035\002 $nick\002\0033 hat \002!woot\002 geschrieben, ermÃ¶chte dir mitteilen: \002$text\002\0039 ----->\0033>\0032>",$chan);
}
}
}

sub fun_save_list(){
foreach (@allowlist){
}
open (AL, ">$fun_qb_allowfile");
	if ( -f AL) 
		{
		foreach (@allowlist) 
			{
			print AL $_."\n";
			}
		close(AL);
		}
open (BL, ">$fun_qb_blockfile");
		if ( -f BL) 
		{
		foreach (@blocklist) 
			{
			print BL $_."\n";
			}
		close(BL);
		}
}

sub fun_qb_add_user{
$nick = $_[0][1];
$arg = $_[0][2];
$arg2 = $arg;
$nick2 = $nick;
unless($arg2){
		iprint("Um einen User zu adden verwende folgenden Syntax: /add <nick> [allow|temp|ignore|block]");
		iprint("allow  : Setzt einen User auf die Allowliste die gespeichert wird");
		iprint("temp   : Setzt einen User auf die Temporaere Allowliste.. (wird nicht gespeichert)");
		iprint("ignore : Setzt einen User auf die Temporaere Ignore Liste.. (wird nicht gespeichert)");
		iprint("block  : Setzt einen User auf die Blockliste die gespeichert wird");
}
unless($nick2){
		iprint("Um einen User zu adden verwende folgenden Syntax: /add <nick> [allow|temp|ignore|block]");
		iprint("allow  : Setzt einen User auf die Allowliste die gespeichert wird");
		iprint("temp   : Setzt einen User auf die Temporaere Allowliste.. (wird nicht gespeichert)");
		iprint("ignore : Setzt einen User auf die Temporaere Ignore Liste.. (wird nicht gespeichert)");
		iprint("block  : Setzt einen User auf die Blockliste die gespeichert wird");
}

if($arg eq "ignore"){
add_nick("ignore",$nick);
qbprint("$nick zu der IgnoreListe geadded :)");
}
elsif($arg eq "block"){
add_nick("block");
qbprint("$nick zu der BlockListe geadded :)");
}

elsif($arg eq "allow"){
add_nick("allow",$nick);
if($fun_qb_auto_qry){
open_query($nick);
qbprint("qry mit $nick wurde geÃ¶ffnet....");
}
qbprint("$nick zu der AllowListe geadded :)");
}

elsif($arg eq "temp"){
add_nick("qry",$nick);
if($fun_qb_auto_qry){
open_query($nick);
qbprint("qry mit $nick wurde geÃ¶ffnet....");
}
qbprint("$nick zu der Temporaeren AllowListe geadded :)");

}

}

sub fun_qb_del_user {
$nick = $_[0][1];
$arg = $_[0][2];

unless($arg){
		iprint("Um einen User zu adden verwende folgenden Syntax: /del <nick> [allow|temp|ignore|block]");
		iprint("allow  : Entfernt einen User von der Allowliste die gespeichert wird");
		iprint("temp   : Entfernt einen User von der Temporaere Allowliste.. (wird nicht gespeichert)");
		iprint("ignore : Entfernt einen User von der Temporaere Ignore Liste.. (wird nicht gespeichert)");
		iprint("block  : Entfernt einen User von der Blockliste die gespeichert wird");
}
unless($nick){
		iprint("Um einen User zu adden verwende folgenden Syntax: /del <nick> [allow|temp|ignore|block]");
		iprint("allow  : Entfernt einen User von der Allowliste die gespeichert wird");
		iprint("temp   : Entfernt einen User von der Temporaere Allowliste.. (wird nicht gespeichert)");
		iprint("ignore : Entfernt einen User von der Temporaere Ignore Liste.. (wird nicht gespeichert)");
		iprint("block  : Entfernt einen User von der Blockliste die gespeichert wird");
}


if($arg eq "ignore"){
del_nick("ignore",$nick);
qbprint("$nick wurde vond er IgnoreListe geloescht....:D");
}
elsif($arg eq "allow"){
del_nick("allow",$nick);
qbprint("$nick wurde vond er AllowListe geloescht....:D");
}
elsif($arg eq "block"){
del_nick("block",$nick);
qbprint("$nick wurde vond er BlockListe geloescht....:D");
}
elsif($arg eq "qry"){
del_nick("qry",$nick);
qbprint("$nick wurde vond er Temporaeren AllowListe geloescht....:D");
}

}


sub fun_qb_query {
$nick = $_[0][1];
$arg = $_[0][2];
$nick2 = $nick;
unless($nick)
	{
	iprint("Keinen Nick angegeben Syntax : /qry <nick> [allow|temp]");
	}
unless($arg)
	{
	if(&check_nick('ignore',$nick2) eq "1")
		{
		qbprint("$nick steht auf der IgnoreListe...um mit ihm zu chatten gibt \002/qry $nick [allow|temp]\002 ein");
		qbprint("allow  : $nick wird auf die fest gespeicherte Allow Liste gesetzt");
		qbprint("temp   : $nick wird nur auf die Temporaere Liste gesetzt...");
	}
	elsif(&check_nick('block',$nick2) eq "1")
		{
		qbprint("$nick steht auf der BlockListe...um mit ihm zu chatten gibt \002/qry $nick [allow|temp]\002 ein");
		qbprint("allow  : $nick wird auf die fest gespeicherte Allow Liste gesetzt");
		qbprint("temp   : $nick wird nur auf die Temporaere Liste gesetzt...");
		}
	else
		{

	add_nick('qry',$nick2);	
		open_query($nick2);
	if($nick eq $current_qry){
		Xchat::command("msg $nick \0033H\0032i\0033H\0032o $nick hat dein qry wurde \0033A\0032kzeptiert....");
		}
		}
	}	
if($arg eq "allow")
	{
	add_nick("allow",$nick2);
	open_query($nick2);
	qbprint("$nick erfolgreich zu der AllowListe geadded...");
	}
elsif($arg eq "temp")
	{
	add_nick("qry",$nick2);
	open_query($nick2);
	qbprint("$nick erfolgreich zu der Temporaeren AllowListe geadded...");
	}
}

sub open_query{
$nick = $_[0];

Xchat::command("query $nick");
if($fun_qb_greetings != undef){
	Xchat::command("msg $nick $fun_qb_greetings");
}
}

sub fun_qb_show_user{
if($fun_qb_status)
	{
	  $count = 1;
	Xchat::print("\0032 ------\0033---\0032\002[\002\0033 AlloW LiSt \0032\002]\002\0033---------\0039--------Â»\0033Â»\0032Â»"); 
	foreach (@allowlist)
		{
		Xchat::print("\0032\002|\002\002(\002\0033 ".$count." \0032\002)\002\0032\002:\002\0033 $_");
		$count++;
		}
	if($allowlist[0] eq undef)
			{
			Xchat::print("\0032\002|\002 -\0033No Users\0032-\0033");
			}
	$count = 1;
	Xchat::print("\0032 ------\0033---\0032\002[\002\0033 BloCk LiSt \0032\002]\002\0033---------\0039--------\0039Â»\0033Â»\0032Â»"); 
	foreach (@blocklist)
		{
		Xchat::print("\0032\002|\002\002(\002\0033 $count \0032\002)\002\0032\002:\002\0033 $_");
		$count++;
		}
	if($blocklist[0] eq undef)
			{
			Xchat::print("\0032\002|\002 -\0033No Users\0032-\0033");
			}
	$count = 1;
	Xchat::print("\0032 ------\0033---\0032\002[\002\0033 TemP AlloW LiSt \0032\002]\002\0033-------\0039-----\0039Â»\0033Â»\0032Â»"); 
	
	foreach (@templist)
		{	
		Xchat::print("\0032\002|\002\002(\002\0033".$count."\0032\002)\002\0032\002:\002\0033 $_");
		$count++;
		}
if($templist[0] eq undef)
			{
			Xchat::print("\0032\002|\002 -\0033No Users\0032-\0033");
			}
	$count = 1;
	Xchat::print("\0032 -----\0033---\0032\002[\002\0033 TemP IgNorE LiSt \0032\002]\002\0033------\0039------\0039Â»\0033Â»\0032Â»"); 
	
	foreach (@ignorelist)
		{
		Xchat::print("\0032\002|\002\002(\002\0033 $count \0032\002)\002\0032\002:\002\0033 $_");
		$count++;
		}
if($ignorelist[0] eq undef)
			{
			Xchat::print("\0032\002|\002 -\0033No Users\0032-\0033");
			}
	Xchat::print("\0032 -----------------\0033---------------\0039--------Â»\0033Â»\0032Â»");
	}
}


sub fun_do_help {

Xchat::print("\n\n");
hprinth("Help fOr Funscript by \0031joog\0038i");
Xchat::print("\n");
hhprint();
hprinth("Status Script");
hprint("Status Away","afk","Stellt deinen Nick auf deinen afk Nick um");
hprint("Status Online","on","Stellt deinen Nick auf Online");
hprint("Status Playing","play"," Je nach Spiel kannst du afk sein ");
bprint("Syntax:[/play (et|q3|wolf|sauer|other)]");
hprint("Status School","school","Du wirst als away gemarked und dein");
bprint("School Nick angenommen");
hprint("Status Work","work","Du bist beim Arbeiten xD same wie school");
hprint("Status Sleep","zzz","....chRRRRR...chRRRRRR...PuuhhHHhhhh..");
Xchat::print("\n");
hprinth("Text Scripts");
hhprint();
hprint("Ultra Slap","slap","Verhau deinen Mitchatter mit der");
bprint("Win2kBuglist *g*");
hprint("Color Change","color_toogle","Aendert deine Schreibtheme");
bprint("0 = Keine Farbe");
bprint("1 = rot blau");
bprint("2 = hellgruen blau");
bprint("3 = blau hellgrau");
hprint("Hammer Hau","hammer","Verhaue deinen Chatpartner mit einem Hammer");
hprint("Jesus fu ","jesus","Fuck Me Jesus Yeahhh....");
hprint("CookieKlau","klau","Klaut jemanden seine Cookies");
hprint("Flamenwerfer","flame","Du spielst mit dem Flamenwerfer");
hprint("Miez Miez...","miez","Ruft einen Spieler fuer dich");
hprint("1337 Script","leet","Aendert einen Satz in soft leetspeak um");
hprint("1337 Toogle","leet_toogle","0 = aus | 1 = an wenn an schrteibst");
bprint("du alles in Leetspeak");  
Xchat::print("\n");
hprinth("Enemy-Territory War Search Script");
hhprint();
bprint("War Search sucht fuer dich einen War");
hprint("3on3 War","3on3","Sucht fuer dich im ausgewaehlten Channel");
bprint("nach einen 3on3");
bprint("Syntax:[/3on3 [Skill] [Server]");
bprint("Skill: low-|low|low+|med-|med|med+...usw..");
bprint("Server: no|yes");
hprint("3on3 War","4on4","Sucht nach einem 4on4");
hprint("3on3 War","5on5","Sucht nach einem 5on5");
hprint("3on3 War","6on6","Sucht nach einem 6on6");
bprint("-HINWEIS- Zum einstellen der Channel Script");
bprint("im txtedit oeffnen :)");
Xchat::print("\n");
hprinth("Xqf ScripT");
hhprint();
bprint("Das Xqf Script aendert automatisch deinen");
bprint("Namen sobald du in XQF ein Spiel startest.");
bprint("Du kannst kannst deine Namen selber in der");
bprint("Scriptdatei aendern.");
hprint("Return..","return","Returned dich vom Spielen...");
hprint("Return..2","re","Return fuer Schreibfaule");
Xchat::print("\n");
hprinth("AmaroK ScripT");
hhprint();
bprint("Amarok Script zum kontrollieren von Amarok");
bprint("durch Xchat..");
hprint("AmaroK Song","asong","Gibt den aktuellen Titel im Xchat wieder");
hprint("AmaroK Play","aplay","Startet Wiedergabe in Amarok");
hprint("AmaroK Pause","apause","Pausiert aktuelle Wiedergabe");
hprint("AmaroK Stop","astop","Stopt die aktuelle Widergabe");
hprint("AmaroK Next","anext","Springt zum naechsten Lied");
hprint("AmaroK Prev","aprev","Springt zum vorhigen Lied");
hprint("AmaroK DevMount","amount","Mountet dein MediaDevices");
hprint("AmaroK Vol..","avol","Aendert die Volumen Einstellung");
bprint("von AmaroK.");
bprint("Syntax: [/avol [+|-]  [Anzahl]]");
bprint("Anzahl: Gibt an um wieviel erhoeht oder ");
bprint("verniedrigt das Volumen von AmaroK werden");
bprint("soll.");
hprint("AmaroK Mute","amute","Muted die AmaroK");
hprint("AmaroK plYlist","aplaylist","Git eine bestimmte Anzahl");
bprint("von den naechsten Lieder in der");
bprint("Das plY heisst welche das das Stueck");
bprint("gerade gespielt wird");
Xchat::print("\n");
hprinth("PcStats ScripT (beta)");
hhprint();
hprint("Pc Stats","pcstats","Gibt die deine Hardware Konfiguration");
bprint("deines Systems wieder.. (cpu,ram,lan,wlan,");
bprint("nvidia karten(ati volgt bald :)");
bprint("Software: Linux Distri und Kernel Version,");
bprint("sowie die Uptime");
Xchat::print("\n");
hprinth("QuerY BloCker");
hhprint();
hprint("qB add","add","Added einen User zu den Listen");
bprint("Syntax:/add <nick> [allow|temp|ignore|block]");
bprint("allow: setzt den User auf die feste");
bprint("Allowliste");
bprint("temp: setzt den User auf die Temp");
bprint("Allow Liste");
bprint("ignore: setzt den User auf die Temp ");
bprint("Ignore Liste");
bprint("block: setzt den User auf die feste");
bprint("Blockliste");
bprint("-HINWEIS- Templiste werden bei neuladen des");
bprint("Scripts geschloescht");
hprint("qB del","del","deletet einen User aus einer Liste");
bprint("Syntax:/del <nick> [allow|temp|ignore|block]");
bprint("selbe Bedeutungen von allow. usw wie bei add"); 
hprint("qB qry","qry","oeffnet einen Query....");
hprint("qB show","showqb","zeigt die akutelle Listen..:");


Xchat::print("\n");
hprinth("FunScript");
hhprint();
hprint("Fun INfo","finfo","Gibt die Aktuelle Verions von");
bprint("FunScript an..");
hprint("Fun Help","fhelp","Zeigt dieses Hilfe Text an... xD");
}

sub fun_do_info{
hprinth("FunScrIpT Version 0.2 (current $version)");
iprint("by Felix aka joogi");
iprint("@ - fun.script@gmx.net");
iprint("HP - r34.r3.funpic.de");
iprint("visit me @ #aloaq @ quakenet");
}
