Advertisement
Guest User

Untitled

a guest
May 21st, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. #!/usr/local/bin/perl -w
  2.  
  3. use strict;
  4.  
  5. use IO::Socket;
  6.  
  7. my $server = "irc.unitx.net";
  8. my $nick = "Uhm";
  9. my $user = "Umh";
  10. my $pass = "";
  11. my $login = "Umh_";
  12. my $channel = "#Unit-X";
  13. my $su = "TheBig";
  14.  
  15.  
  16. sub antikick
  17. {
  18. my ($input,$sock) = (shift,shift);
  19. if ($input =~ /^:.+!~.+ KICK #.+ .+ :.+/){ print $sock "JOIN ".$channel."\r\n"; }
  20. if ($input =~ /Cannot join channel/i) { print $sock "JOIN ".$channel."\r\n"; }
  21. }
  22.  
  23. my $sock = new IO::Socket::INET(PeerAddr => $server,
  24. PeerPort => 6667,
  25. Proto => 'tcp') or
  26. die "Non posso connettermi a $server\n";
  27.  
  28.  
  29.  
  30. print $sock "PASS $pass\r\n";
  31. print $sock "NICK $nick\r\n";
  32. print $sock "JOIN $channel\r\n";
  33. print $sock "PRIVMSG #Unit-X : ........\r\n";
  34.  
  35. while (my $input = <$sock>) {
  36. chop $input;
  37. if ($input =~ /^PING(.*)$/i) {
  38.  
  39. print $sock "PONG $1\r\n";
  40. }
  41. else {
  42.  
  43. print "$input\n";
  44. }
  45.  
  46. if ($input =~ /:(.*?)!/) {
  47. $user= $1;
  48. }
  49.  
  50. if ($input =~ m/:!bella/) {
  51.  
  52. print $sock "PRIVMSG #Unit-X :suka $1,gay!\r\n";
  53. }
  54.  
  55. if ($input =~ m/:!list|:!lista/) {
  56.  
  57. print $sock "PRIVMSG #Unit-X : Oh,scemo pagliaccio.Niente liste qui!!! Fanculo.!\r\n";
  58. }
  59.  
  60. if($input=~m/:!fuck/ & $input=~/$su/) {
  61.  
  62. print $sock "QUIT\n";
  63.  
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement