Gaming Community
Forum
 
Go Back   D3scene > Software/Hardware > Software > IRC
Register Blogs Live view Downloads Marketplace FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

How to connect a bot via ur website

This is a discussion on How to connect a bot via ur website within the IRC forum part of the Software category; This script is written in perl language.U can connect ur bot via ur website.i added few commands so the bot ...


Welcome on D3scene.com! Make sure to register - it's free and very quick! You have to register before you can post and participate in our discussions with 70000 other registered members. Downloads, user profiles and some forums can only be seen by registered members. After you create your free account you will be able to customize many options, you will have the full access to new hacks, latest cheats and last but not least will see no advertisements at all. We would love to see you around in our community!
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 11-04-2009, 04:35 PM
Ginzo's Avatar
Premium Member

 
Join Date: Mar 2007
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 55
Rep Power: 3
Ginzo will become famous soon enough
How to connect a bot via ur website

This script is written in perl language.U can connect ur bot via ur website.i added few commands so the bot can response in ur commands.
TIP: the bot will be 24/7 online if ur website is running.U can close ur browser if u want after that the bot still running.

Code:
--------------
PERL CONNECT BOT IRC
-------------------


#!/usr/bin/perl
use strict;
use warnings;
use IO::Socket::INET;

#Autoflush the output buffer
$| = 1;
#Create child process
my $pid = fork();
#If program is child process connect to irc
if ($pid == 0) {
	my $socket = IO::Socket::INET->new(PeerAddr => 'global.irc.gr:6667');
	print $socket "USER perl localhost global.irc.gr Celestrial\r\n";
	print $socket "NICK Celestrial\r\n";

	my $time = time();

	while (my $line = <$socket>) {
		chomp $line;
		my @words = split (/\s+/, $line);
		my $nickname = shift @words;
		my $cmd = shift @words;
		shift @words;
		if ((substr($nickname, 0, 6) eq ':Ginzo!') and ($cmd eq 'PRIVMSG')) {
			my $message = join (' ', @words);
			$message = substr($message, 1);
			print $socket "$message\r\n";
		
		}
		#Send PING to server every 1 min
		if (time() - $time >= 60) {
			print $socket "PING\r\n";
			$time = time();	
		}
	}
}
global.irc.gr:6667 -> load it in the server that u want
Celestrial -> its the name of the bot
Ginzo -> is the name that bot can understand who is his admin
PRVMSG -> its the command that bot can understand his admin
Reply With Quote
D3scene
Welcome to D3scene - probably the best location for all Gamers.

To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!


The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ghoul Bot Free KaMiKaZe Warcraft 3 Bots 202 06-01-2009 02:58 PM
Antfamous Gauntlet Bot v1.8 for mmBot tschoerk Diablo 2 Hacks 9 04-29-2009 03:33 PM
Genocide Bot Documentation xHack Warcraft 3 Bots 0 04-15-2009 10:00 PM
IRC Bot & Tut for it Diesel IRC 0 06-26-2008 03:50 AM
[Guide] Making a C5 server on WinOS Ginzo Lineage 2 Guides 0 04-03-2007 05:57 PM


All times are GMT +1. The time now is 01:49 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.
vBulletin style developed by Transverse Styles