Пример #1
0
static int 
msg_porn(const char *replyto, struct userlist *user, char *data)
{
	char *message;
	char *begin_yp = "http://www.youporn.com/search?query=";
	char *end_yp = "&type=straight";
	char *begin_rt = "http://www.redtube.com/?search=";
	char *begin_pt = "http://www.porntube.com/search?q=";
	char *end_pt = "&Submit=Go";
	int i;
	
	if (data == NULL) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Syntax error: P**n <text>");
		return(0);
	}
	
	message = strtok(data, "");
	
	info_log("YouPorn \"%s\" on %s by %s\n", message, replyto, unick(user));
	info_log("PornTube \"%s\" on %s by %s\n", message, replyto, unick(user));
	info_log("RedTube \"%s\" on %s by %s\n", message, replyto, unick(user));

	
	for (i = 0; i < strlen(message); i++) {
		if (*(message + i) == ' ') {
			*(message + i) = '+';
		}
	}
	
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "YouPorn: %s%s%s", begin_yp, message, end_yp);
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "RedTube: %s%s", begin_rt, message);
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "PornTube: %s%s%s", begin_pt, message, end_pt);

	return(0);
}
Пример #2
0
//mela actions :)
static int
msg_peluche(const char *replyto, struct userlist *user, char *data)
{
	char *message, *msg;
	int i;

	if (data != NULL) {
		message = strtok(data, "");

		if (*(message + strlen(message) - 1) == ' ')
			*(message + strlen(message) - 1) = '\0';
	
		msg = malloc(sizeof(char) * strlen(data) + 1);
		for (i = 0; i < strlen(data); i++)
			*(msg + i) = '=';
		*(msg + strlen(data)) = '\0';
	
		info_log("Peluche %s on %s by %s\n", message, replyto, unick(user));
		
		privmsg(usinfo(user), replyto, "%s: 8%sD", message, msg);

		free(msg);
	} else {
		info_log("Peluche on %s by %s\n", replyto, unick(user));

		privmsg(usinfo(user), replyto, "8=============D");
	}

	return (0);
}
Пример #3
0
static int msg_kick(const char *replyto, struct userlist *user, char *data)
{

	char *channel, *nick, *message ;
	struct userlist *target;
	int user_access;

	/* syntax: kick <channel> <nick> */
	channel = strtok(data, " ");
	nick = strtok(NULL, " ");
	message = strtok(NULL, "");

	if (channel == NULL || nick == NULL) {
		msgreply(user, replyto, "Syntax error: kick <channel> <nickname>");
		return (0);
	}

	if (strcaseeq(nick, user->userinfo->server->nick)) {
		info_log("%s tried to make me kick myself\n", unick(user));
		irc_sprintf(usinfo(user), "KICK %s %s :Try to make me kick myself eh?\n", channel, unick(user));
		return (0);
	}

	user_access = GetChannelAccess(user, channel);

	if (user_access < 0)
		return (access_too_low(user, replyto));

	target = GetFromChannel(nick, channel, user->userinfo->server);

	if (target == NULL)
		msgreply(user, replyto, "I don't see that user in the channel");

	if ((target->access >= 0) && (user_access > target->access)) {
		privmsg(usinfo(user), unick(target), "%s tried to kick you!", unick(user) );
		privmsg(usinfo(user), replyto, "attempt to kick user with higher access denied");
		return (0);
	}

	info_log("KICK %s %s\n", channel, unick(target));

	msgreply(user, replyto, "Kicking %s on %s", nick, channel);

	if (message == NULL) {
		irc_sprintf(usinfo(user), "KICK %s %s\n", channel, nick);
		return (0);
	} else {
		irc_sprintf(usinfo(user), "KICK %s %s :%s\n", channel, nick, message);
		return (0);
	}
}
Пример #4
0
static int 
msg_google(const char *replyto, struct userlist *user, char *data)
{
	char *message;
	char *begin_web = "http://www.google.it/search?hl=it&q=";
	char *end_web = "&btnG=Cerca&meta=";
	char *begin_img = "http://images.google.it/images?q=";
	char *end_img = "&um=1&ie=UTF-8&sa=N&tab=wi";
	char *begin_news = "http://news.google.it/news?hl=it&q=";
	char *end_news = "&um=1&ie=UTF-8&sa=N&tab=in";
	int i;
	
	if (data == NULL) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Syntax error: google <text>");
		return(0);
	}
	
	message = strtok(data, "");
	
	info_log("Google \"%s\" on %s by %s\n", message, replyto, unick(user));
	
	for (i = 0; i < strlen(message); i++) {
		if (*(message + i) == ' ') {
			*(message + i) = '+';
		}
	}
	
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Google Web: %s%s%s", begin_web, message, end_web);
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Google Immagini: %s%s%s", begin_img, message, end_img);
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Google News: %s%s%s", begin_news, message, end_news);

	return(0);
}
Пример #5
0
static int msg_topic(const char *replyto, struct userlist *user, char *data)
{
	char *channel, *topic ;

	if (data == NULL) {
		msgreply(user, replyto, "Syntax error: topic <channel> <text>");
		return (0);
	}

	channel = strtok(data, " ");
	topic = strtok(NULL, "");

	if (channel == NULL || topic == NULL) {
		msgreply(user, replyto, "Syntax error: topic <channel> <text>");
		return (0);
	}

	if (GetChannelAccess(user, channel) < 0) {
		return (access_too_low(user, replyto));
	}
	info_log("Topic on %s set to %s by %s\n", channel, topic, unick(user));

	msgreply(user, replyto, "Changing topic on %s", channel);

	irc_sprintf(usinfo(user), "TOPIC %s :%s\n", channel, topic);

	return (0);

}
Пример #6
0
static int msg_mode(const char *replyto, struct userlist *user, char *data)
{
	char *channel, *modes ;

	if (data == NULL) {
		msgreply(user, replyto, "Syntax error: mode <channel> <flags>");
		return (0);
	}

	channel = strtok(data, " ");
	modes = strtok(NULL, "");

	if (channel == NULL || modes == NULL) {
		msgreply(user, replyto, "Syntax error: mode <channel> <flags>");
		return (0);
	}

	if (GetChannelAccess(user, channel) < 0) {
		return (access_too_low(user, replyto));
	}
	info_log("Mode change %s on %s by %s\n", modes, channel, unick(user));
	msgreply(user, replyto, "Changing mode on %s to %s", channel, modes);
	irc_sprintf(usinfo(user), "MODE %s %s\n", channel, modes);

	return (0);
}
Пример #7
0
static int msg_join(const char *replyto, struct userlist *user, char *data)
{
	char *channel, *key ;

	if (data == NULL) {
		msgreply(user, replyto, "Syntax error: join <channel> <key>");
		return (0);
	}

	channel = strtok(data, " ");
	key = strtok(NULL, "");

	if (channel == NULL) {
		msgreply(user, replyto, "Syntax error: join <channel> <key>");
		return (0);
	}

	if (EnterChannel(data, key, user->userinfo->server) == -1) {
		msgreply(user, replyto, "I'm in that channel already");
	} else {
		msgreply(user, replyto, "Joining %s", channel);
		info_log("Join to %s requested by %s\n", channel, unick(user)) ;
	}

	return (0);
}
Пример #8
0
static int 
msg_youtube(const char *replyto, struct userlist *user, char *data)
{
	char *message;
	char *begin = "http://www.youtube.com/results?search_query=";
	char *end = "&search_type=&aq=-1&oq=";
	int i;
	
	if (data == NULL) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Syntax error: YouTube <text>");
		return(0);
	}
	
	message = strtok(data, "");
	
	info_log("YouTube \"%s\" on %s by %s\n", message, replyto, unick(user));
	
	for (i = 0; i < strlen(message); i++) {
		if (*(message + i) == ' ') {
			*(message + i) = '+';
		}
	}
	
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "%s%s%s", begin, message, end);
	return(0);
}
Пример #9
0
static int 
msg_meteo(const char *replyto, struct userlist *user, char *data)
{
	char *message;
	char *begin_meteo = "http://www.google.it/search?hl=it&q=meteo+";
	char *end_meteo = "&btnG=Cerca+con+Google&meta=";
	int i;
	
	if (data == NULL) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Syntax error: meteo <city>");
		return(0);
	}
	
	message = strtok(data, "");
	
	info_log("Meteo \"%s\" on %s by %s\n", message, replyto, unick(user));
	
	for (i = 0; i < strlen(message); i++) {
		if (*(message + i) == ' ') {
			*(message + i) = '+';
		}
	}
	
	send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Meteo Web: %s%s%s", begin_meteo, message, end_meteo);

	return(0);
}
Пример #10
0
int handle_command(struct userlist *user, const char *dest, char *message)
{
	const char *command;
	char *rest, *trest;
	const char *replyto;
	struct commandlist *listptr;
	int ret;
	
	if(user->access < 0) {
		/* banned users get nothing */
		return(0);
	}
	if(user->access > botinfo->floodexempt) {
		if(botinfo->ctcpdelay != 0 && botinfo->cmddelay+user->lastcmd >= currtime) {
        		time(&user->lastcmd);
        		return(0);
		}
	}
	time(&user->lastcmd);
                        
	if (strcaseeq(dest, user->userinfo->server->nick))
		replyto = unick(user);
	else
		replyto = dest;
	
	command = strtok(message, " ");
	rest = strtok(NULL, "");

	listptr = usercommandlist;
	
	while (listptr != NULL) {
		if (strcaseeq(command, listptr->cmd)) {
			if (user->access <= listptr->access) {
				if ( rest != NULL && (listptr->flags & cmd_param_rw )) { 
					trest = strdup(rest);
					ret = listptr->function(replyto, user, trest);
					safefree(trest);
					return(ret);
				} else {
					ret = listptr->function(replyto, user, rest);
					return (ret);
				}
			} else {
				return (access_too_low(user, replyto));
			}
		}
		listptr = listptr->next;

	}
	return (0);
}
Пример #11
0
static int 
msg_help(const char *replyto, struct userlist *user, const char *UNUSED(data)) 
{
  	time_t time_cur;
  	struct tm tm_cur;
	
  	time_cur = time(NULL);
  	tm_cur = *(struct tm *) localtime(&time_cur);
	
	if (help_timeout != -1 && tm_cur.tm_min < help_timeout) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Bot busy...try again in a few seconds...\n");
		return(0);
	}
	
	help_timeout = tm_cur.tm_min + 2;
	
	info_log("Help by %s\n", unick(user));

	msguser(user, " *** Bot help: ***\n");
	msguser(user, "!access                         Show your access level\n");
	msguser(user, "!action    <text>               Action message\n");
	msguser(user, "!botuptime                      Show bot's uptime\n");
	msguser(user, "!sysuptime                      Show system's uptime\n");
	msguser(user, "!time                           Show bot's time machine\n");
	msguser(user, "!hu        [nick]               Hu message\n");
	msguser(user, "!freshair  [nick]               Freshair message\n");
	msguser(user, "!freshhu   [nick]               Freshhu message\n");
	msguser(user, "!say       [nick] <text>        Say text to nick (Nick is not required)\n");
	msguser(user, "!peluche   [nick]               Don't ask...for peluche\n");	
	msguser(user, "!google    <key>                Search on Google Web, Image and News\n");
	msguser(user, "!youtube   <key>                Search on YouTube\n");
	msguser(user, "!meteo     <city>               Search city's meteo\n");	
	msguser(user, "!ansa      <key | list>         Search key from www.ansa.it or print list possible key\n");	
	msguser(user, "!p**n      <key>                Self-Explicative VM.18\n");	
	msguser(user, "!utf8                           Show how to change charset to utf-8 in X-Chat\n");
	msguser(user, "!version                        Show bot's version\n");
	msguser(user, "!help                           This help\n");
	msguser(user, " *** Admin only commands: ***\n");
	msguser(user, "!ctcp      <on | off>           CTCP message mode\n");
	msguser(user, "!identify  [password]           Identify you in\n");
	msguser(user, "!join      <channel> [key]      Join other channel (key if required)\n");
	msguser(user, "!kick      <nick> [message]     Kick nickname\n");
	msguser(user, "!nick      <nick>               Change nickname\n");
	msguser(user, "!part      <channel> [text]     Exit from channel\n");
	msguser(user, "!raw       <command>            Parse your commands\n");
	msguser(user, "!reload                         Reload Log and User file\n");
	msguser(user, "!shutdown                       Shutdown the bot\n");

	return(0);
}
Пример #12
0
static int 
msg_lista(const char *replyto, struct userlist *user, const char *UNUSED(data))
{
	struct server_list *server;
	
	server = user->userinfo->server;
	
	info_log("KICK to %s on %s\n", unick(user), replyto);
	
	msgreply(user, replyto, "Il premio 'Ciao sono un imbecille e cerco warez' di oggi va a %s!", unick(user));
	
	irc_sprintf(usinfo(user),"KICK %s %s :Come osi cercare Warez qui, TROLL!\n", replyto, unick(user));
	
	return(0);
}
Пример #13
0
static int msg_raw(const char *replyto, struct userlist *user, const char *data)
{

	if (data == NULL) {
		msgreply(user, replyto, "Syntax error: raw <command>");
		return(0);
	}
	if (strcaseeq(data, "QUIT")) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Error: use shutdown instead");
		return (0);
	}
	info_log("RAW: %s by %s\n", data, unick(user));
	msguser(user, "Sending raw message> %s", data);
	irc_sprintf(usinfo(user),"%s\n", data);
	return(0);
}
Пример #14
0
/*
static int msg_say(const char *replyto, struct userlist *user, char *data)
{
	char *channel, *message;

        if (data == NULL) {
                msgreply(user, replyto, "Syntax error: say <channel> <text>");
                return(0);
        }

	channel = strtok(data, " ");
	message = strtok(NULL, "");

	if (channel == NULL || message == NULL) {
		msgreply(user, replyto, "Syntax error: say <channel> <text>");
		return(0);
	}

	if (GetChannelAccess(user, channel) < 0) {
		return (access_too_low(user, replyto));
	}

	info_log("Say %s on %s by %s\n", message, channel, unick(user));

	msguser(user, "Saying message on %s", channel);
	privmsg(usinfo(user),channel, "%s", message);
	return(0);

}
*/
static int 
msg_say(const char *replyto, struct userlist *user, char *data)
{
	char *message;
	
	if (data == NULL) {
		return(0);
	}
	
	message = strtok(data, "");
	
	info_log("Say %s on %s by %s\n", message, replyto, unick(user));
	
	privmsg(usinfo(user), replyto, "%s", message);
	
	return(0);
}
Пример #15
0
//mela version
static int 
msg_action(const char *replyto, struct userlist *user, char *data)
{
	char *message;
	
	if (data == NULL) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Syntax error: action <text>");
		return(0);
	}
	
	message = strtok(data, "");
	
	info_log("Action %s on %s by %s\n", message, replyto, unick(user));
	
	irc_sprintf(usinfo(user), "PRIVMSG %s :%cACTION %s%c\n", replyto, CTCP_DELIM_CHAR, message, CTCP_DELIM_CHAR);
	
	return(0);
}
Пример #16
0
static int msg_part(const char *replyto, struct userlist *user, const char *data)
{

	if (data == NULL) {
		msgreply(user, replyto, "Syntax error: part <channel>");
		return (0);
	}

	if (ExitChannel(data, user->userinfo->server) == -1) {
		msgreply(user, replyto, "I'm not in channel %s", data);
	} else {
		msgreply(user, replyto, "Parting %s", data);
		info_log("Parted %s by %s\n", data, unick(user)) ;
	}

	return (0);

}
Пример #17
0
static int msg_nick(const char *replyto, struct userlist *user, const char * data)
{
	struct server_list *server;
	
	if (data == NULL) {
		msgreply(user, replyto, "Syntax error: nick <nickname>");
		return(0);
	}
	
	server = user->userinfo->server;
	
	info_log("NICK changed from %s to %s by %s\n", server->nick, data,
	    unick(user));

	free(server->nick);
	server->nick = strdup(data);

	msgreply(user, replyto, "Changing nick to %s", server->nick);
	irc_sprintf(usinfo(user),"NICK %s\n", server->nick);
	return(0);
}
Пример #18
0
static int 
msg_freshhu(const char *replyto, struct userlist *user, char *data)
{
	char *message;
	
	if (data == NULL) {
		privmsg(usinfo(user), replyto, "PRHUUUUUUUUUUUUUU");
		
		return(0);
	}
	
	message = strtok(data, "");
	
	info_log("Freshhing %s on %s by %s\n", message, replyto, unick(user));

	if (message[strlen(message) - 1] == ' ')
        	message[strlen(message) - 1] = '\0';
	
	privmsg(usinfo(user), replyto, "%s: PRHUUUUUUUUUUUUUU", message);
	
	return(0);
}
Пример #19
0
static int msg_op(const char *replyto, struct userlist *user, char *data)
{
	const char *channel, *password, *nick;
	struct socket_info *sinfo ;
	int user_access;

	channel = NULL;
	password = NULL;

	if (data != NULL) {

		/* syntax: op <channel> <password> */

		channel = strtok(data, " ");
		password = strtok(NULL, "");
	}

	if (channel == NULL) {
		if (replyto[0] == '#') {
			channel = replyto;
		} else {
			msgreply(user, replyto, "Syntax error: op <channel> <password>");
			return (0);
		}
	}

	if (password != NULL)
		UpdateAccess(user, password);

	user_access = GetChannelAccess(user, channel);

	if (user_access < 0) {
		msgreply(user, replyto, "Authorization failed!");
		return (0);
	}

	sinfo = usinfo(user) ;
	nick = unick(user) ;
	
	if (user_access <= botinfo->oplevel) {
		info_log("Op %s on %s\n", nick, channel);
		msgreply(user, replyto, "Opping %s on %s", nick, channel);
		irc_sprintf(sinfo, "MODE %s +o %s\n", channel, nick);

		return (0);
	}

	if (user_access <= botinfo->hoplevel) {
		info_log("HOp %s on %s\n", nick, channel);
		msgreply(user, replyto, "Half opping %s on %s", nick, channel);
		irc_sprintf(sinfo, "MODE %s +h %s\n", channel, nick);

		return (0);
	}

	if (user_access <= botinfo->voicelevel) {
		info_log("Voice %s on %s\n", nick, channel);
		msgreply(user, replyto, "Voiceing %s on %s", nick, channel);
		irc_sprintf(sinfo, "MODE %s +v %s\n", channel, nick);

		return (0);
	}

	msgreply(user, replyto, "Authorization failed!");
	return (0);
}
Пример #20
0
static int msg_deop(const char *replyto, struct userlist *user, char *data)
{

	const char *channel, *nick, *snick, *tnick;
	struct socket_info *sinfo ;
	struct userlist *target;
	int user_access;

	channel = NULL;
	nick = NULL;

	if (data != NULL) {

		/* syntax: deop <channel> <nick> */

		channel = strtok(data, " ");
		nick = strtok(NULL, "");
	}

	if (channel == NULL) {
		if (replyto[0] == '#') {
			channel = replyto;
		} else {
			msgreply(user, replyto, "Syntax error: deop <channel> <nick>");
			return (0);
		}
	}

	user_access = GetChannelAccess(user, channel);

	if (user_access < 0) {
		return (access_too_low(user, replyto));
	}

	sinfo = usinfo(user) ;
	
	if (nick == NULL) {
		irc_sprintf(sinfo, "MODE %s -o %s\n", channel, unick(user));
		return(0) ;
	}

	target = GetFromChannel(nick, channel, user->userinfo->server);
	tnick = unick(target) ;

	snick = unick(user) ;

	if (target == NULL) {
		msgreply(user, replyto, "I don't see that user in the channel");
		return (0);
	}
		
	if ((target->access >= 0) && (user_access > target->access)) {
		privmsg(sinfo, tnick, "%s tried to deop you!", snick);
		msgreply(user, replyto, "attempt to deop user with higher access denied");
		return (0);
	}

	info_log("Deop %s on %s\n", snick, channel);
	msgreply(user, replyto, "Deopping %s on %s", tnick, channel);
	irc_sprintf(sinfo, "MODE %s -o %s\n", channel, tnick);
	return (0);
}
Пример #21
0
static int 
msg_ansa(const char *replyto, struct userlist *user, char *data)
{
	char *message;

	if (data == NULL) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Syntax error: ansa <key | list>");
		return(0);
	}

	message = strtok(data, "");
	
	info_log("Ansa \"%s\" on %s by %s\n", message, replyto, unick(user));

	/* List possible key */
	if (strcaseeq("list", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Ansa key");
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "General: top, english, italia, mondo, sport, calcio, economia, cultura, scienza, internet, spettacolo, moda, musica, cinema.");
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Regions: abruzzo, basilicata, calabria, campania, emilia romagna, friuli venezia giulia, lazio, liguria, lombardia, marche, molise, piemonte, puglia, sardegna, sicilia, toscana, trentino alto adige, umbria, valle d'aosta, veneto.\n"); 
	/* General */
	} else if (strcaseeq("top", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/topnews/topnews.html"); 
	} else if (strcaseeq("english", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/english/english.html");
	} else if (strcaseeq("italia", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/italia/italia.html");
	} else if (strcaseeq("mondo", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/mondo/mondo.html");
	} else if (strcaseeq("sport", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/sport/sport.html");
	} else if (strcaseeq("calcio", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/calcio/calcio.html");
	} else if (strcaseeq("economia", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/economia/economia.html");
	} else if (strcaseeq("cultura", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/cultura/cultura.html");
	} else if (strcaseeq("scienza", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/scienza/scienza.html");
	} else if (strcaseeq("internet", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/internet/internet.html");
	} else if (strcaseeq("spettacolo", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/spettacolo/spettacolo.html"); 
	} else if (strcaseeq("moda", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/moda/moda.html"); 
	} else if (strcaseeq("musica", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/musica/musica.html"); 
	} else if (strcaseeq("cinema", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/awnplus/cinema/cinema.html");
	/* Regions */
	} else if (strcaseeq("abruzzo", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/abruzzo/abruzzo.html");
	} else if (strcaseeq("basilicata", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/basilicata/basilicata.html"); 
	} else if (strcaseeq("calabria", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/calabria/calabria.html");
	} else if (strcaseeq("campania", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/campania/campania.html");
	} else if (strcaseeq("emilia romagna", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/emiliaromagna/emiliaromagna.html");
	} else if (strcaseeq("friuli venezia giulia", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/friulivgiulia/friulivgiulia.html");
	} else if (strcaseeq("lazio", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/lazio/lazio.html");
	} else if (strcaseeq("liguria", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/liguria/liguria.html");
	} else if (strcaseeq("lombardia", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/lombardia/lombardia.html");
	} else if (strcaseeq("marche", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/marche/marche.html");
	} else if (strcaseeq("molise", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/molise/molise.html");
	} else if (strcaseeq("piemonte", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/piemonte/piemonte.html");
	} else if (strcaseeq("puglia", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/puglia/puglia.html");
	} else if (strcaseeq("sardegna", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/sardegna/sardegna.html");
	} else if (strcaseeq("sicilia", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/sicilia/sicilia.html");
	} else if (strcaseeq("toscana", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/toscana/toscana.html");
	} else if (strcaseeq("trentino alto adige", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/trentino/trentino.html");
	} else if (strcaseeq("umbria", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/umbria/umbria.html");
	} else if (strcaseeq("valle d'aosta", message) || strcaseeq("valle d`aosta", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/valledaosta/valledaosta.html");
	} else if (strcaseeq("veneto", message)) {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "http://www.ansa.it/site/notizie/regioni/veneto/veneto.html"); 
	} else {
		send_notice(user->userinfo->server->sinfo, user->userinfo->nick, "Key not found, use ansa list");
	}

	return(0);
}