SHARE
TWEET

Untitled

a guest Aug 12th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Modules::Scan::verbose;
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. sub handle_join
  7. {
  8.         # Don't flood channel on netjoin
  9.         return if ($main::NETJOIN == 1);
  10.         my($nick,$chan) = @_;
  11.     if ($main::ugly) {
  12.     main::message("Channel join: $nick joined $chan");
  13.     }else{
  14.         main::message("\00303Channel join: \00310$nick\00303 joined \017\002$chan\017");
  15.     }
  16. }
  17.  
  18. sub handle_part
  19. {
  20.         my($nick,$chan) = @_;
  21.     if ($main::ugly) {
  22.     main::message("Channel part: $nick parted $chan");
  23.     }else{
  24.         main::message("\00303Channel part: \00310$nick\00303 parted \017\002$chan\017");
  25.     }
  26.  
  27. }
  28.  
  29. sub handle_kick
  30. {
  31.         my($nick,$chan,$kicked,$reason) = @_;
  32.         if ($main::ugly) {
  33.         main::message("Channel kick: $kicked was kicked from $chan");
  34.         }else{
  35.         main::message("\00307Channel kick: \00310$kicked\00307 was kicked from\017\002 $chan\017");
  36.         }
  37. }
  38.  
  39. sub handle_quit
  40. {
  41.         my($quitnick,$quitreason) = @_;
  42.     if ($main::ugly) {
  43.     main::message("Client exiting: $quitnick ( $quitreason )");
  44.     }else{
  45.         main::message("\00303Client exiting: \00310$quitnick \017\002(\017 $quitreason\017 \002)\017");
  46.     }
  47. }
  48.  
  49.  
  50. sub handle_topic
  51. {
  52.     my($nick,$chan,$topic) = @_;
  53.     if ($main::ugly) {
  54.     main::message("Topic for channel $chan was changed.");
  55.     }else{
  56.     main::message("\00303Topic for channel \017\002$chan\017\00303 was changed.\017");
  57.     }
  58. }
  59.  
  60. sub scan_user
  61. {
  62.         my ($ident,$host,$serv,$nick,$gecos,$print_always) = @_;
  63.         # Don't flood channel on netjoin
  64.         return if ($main::NETJOIN == 1);
  65.     if ($main::ugly) {
  66.     main::message("Client connecting: $nick!$ident@$host $gecos");
  67.     }else{
  68.         main::message("\00303Client connecting: \00310$nick\017\002!\017\00303$ident\017\002@\017\00307$host\017 \00308$gecos\017");
  69.     }
  70. }
  71.  
  72. sub handle_nick
  73. {
  74.         my ($oldnick,$newnick) = @_;
  75.     if ($main::ugly) {
  76.     main::message("Nick change: $oldnick changed his/her nickname to $newnick");
  77.     }else{
  78.         main::message("\00308Nick change: \00310$oldnick\00308 changed his/her nickname to \00310\002$newnick\017");
  79.     }
  80. }
  81.  
  82. sub handle_notice
  83. {
  84.  
  85. }
  86.  
  87. sub handle_privmsg
  88. {
  89.  
  90. }
  91.  
  92. sub init {
  93.  
  94.         if (!main::depends("core-v1")) {
  95.                 print "This module requires version 1.x of defender.\n";
  96.                 exit(0);
  97.         }
  98.         main::provides("verbose");
  99.     if (!$main::ugly) {
  100.         print "\nThis module is configured to use colors in the control channel.  If this is undesirable, set the line 'ugly' to 1 in the config file.\n";
  101.         print "Loading: Modules/Scan/verbose.pm... ";
  102.     }
  103. }
  104.  
  105. # And larry said, all thou module slalt end with one, and it was so.
  106.  
  107. 1;
RAW Paste Data
Top