Can i get this script

Status
Not open for further replies.

med.zrouga

New Member
Messages
7
Reaction score
0
Points
0
I have found this script to connect to irc
Code:
http://www.phpbots.org
can i have it installed caus it will act as the bot in the channel irc i have .
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
If it's php only, you can install it yourself. If you have any specific problems on installing it, don't hesitate to ask :p
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
It is just a php script, however you must run it locally and not on x10. I'm pretty sure that script uses CLI output, and also x10 has a max execution time of 30seconds on free servers.

You can install php locally on your computer and run it there if you need. You can get the windows binary installer at http://php.net

any questions just ask!
 

zapzack

New Member
Messages
606
Reaction score
19
Points
0
You cannot run this script on the free hosting. It uses PHP-CLI, which is only available from a shell.. If you tried to run this via a cron, it is too process intensive and you would probably be suspended. I am speaking from experience since I made my own php irc bot..
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
He can't run it at all. The execution time and exhaustion limit is too low. I already said that.
 

med.zrouga

New Member
Messages
7
Reaction score
0
Points
0
ok so php bot is denied , thanks people .
I coded an perl script myself that would do it can i have it on the server ?

here is my script

Code:
#!/usr/bin/perl 
use LWP::Simple; 
use LWP::UserAgent; 
use HTML::TokeParser; 
use IO::Socket; 
use URI::Escape; 
 
 
 
my $ircserver = "irc.rizon.net"; 
my $ircchannel = "#zargonovski";  
my $nickname = "Zebot";  
my $username = "med Zrouga"; 
my $help = "http://www.zargonovski.co.cc/help.txt"; 
 
my $browser = LWP::UserAgent->new; 
 
$sock = IO::Socket::INET->new( 
        PeerAddr => $ircserver, 
        PeerPort => 6667,  
        Proto => 'tcp' ) or die "could not make the connection"; 
 
while($line = <$sock>){ 
        print $line; 
        if($line =~ /(NOTICE AUTH).*(checking ident)/i){ 
                print $sock "NICK $nickname\nUSER $username 0 0 :just a bot\n"; 
                last; 
        } 
} 
 
while($line = <$sock>){ 
        print $line;     
         
        if($line =~ /^PING/){ 
                print $sock "PONG :" . (split(/ :/, $line))[1]; 
        } 
        if($line =~ /(376|422)/i){ 
                 
                last; 
        } 
} 
 
sleep 3; 
 
print $sock "JOIN $ircchannel \n"; 
 
 
# Main 
 
print "/-------------------------------------------------------------------------|\n"; 
print "|------------------------------- irc bot ---------------------------------|\n"; 
print "|-------------------------------------------------------------------------|\n"; 
print "|\n"; 
#/////////////////////////////////////////////////////////////////////////////////////////// 
 
 
while ($line = <$sock>) { 
         
        ($command, $text) = split(/ :/, $line);    
        if ($command eq 'PING'){ 
                 
                while ( (index($text,"\r") >= 0) || (index($text,"\n") >= 0) ){ chop($text); } 
                print $sock "PONG $text\n"; 
                next; 
        } 
        
         
        ($nick,$type,$channel) = split(/ /, $line);  
         
        ($nick,$hostname) = split(/!/, $nick);  
         
        $nick =~ s/://;  
         
        $ok=0; 
        $/ = "\r\n"; 
        while($text =~ m#$/$#){ chomp($text); } { 
         
                print "<$nick> <$hostname> <$type> $text\n"; 
                if ($type="PRIVMSG") 
                { 
                if($text =~ /^l0g1n/){ 
                ################################### checking for user 
                print $sock "WHOIS $nick\n" ; 
                $temp = $nick; 
                print $sock "PRIVMSG $ircchannel :* Welcome!\n" ; 
                #################################### 
                } 
                 
                if ($text =~ /^help(.*)/){             
                print $sock  "PRIVMSG $ircchannel :$help\n"; 
                } 
                if ($text =~ /^cmd(.*)/){ 
                @perso = split(/:+/, $text); 
                if ($perso[1]="the_pass"){ 
                print $sock  "$perso[2]\n";     
                } 
                } 
                } 
                } 
                if ($line =~ /(.*)319 Zebot(.*)/) 
                { 
                print $sock "mode $ircchannel +o $temp\n" ; 
                $temp=""; 
                } 
                ################################################# 
                $responsetext = ""; 
}

please help me can i have this runing as a free user ?
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
I think anything that runs constantly would not be allowed.

I didn't think about that when I first posted, I just saw that it was a PHP script and didn't read the rest :biggrin:
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Like I said, you can run it on your home server, but you can't run any type of those scripts on free hosting.
 
Status
Not open for further replies.
Top