Guest User

Untitled

a guest
May 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. sub on_cprivmsg {
  2. my ($src, $chan, @msg) = @_;
  3. $fullmsg = join ' ', @msg;
  4. $bot->learn($fullmsg);
  5. $rand = int(rand(100));
  6. $wat2say = $bot->reply($fullmsg);
  7. if (substr($wat2say, 0, 1) eq '!') {
  8. while (substr($wat2say, 0, 1) eq '!') {
  9. $wat2say = $bot->reply($fullmsg);
  10. }
  11. }
  12. if ($talk == 1) {
  13. if (((index($fullmsg, $State::IRC::botinfo{$src->{svr}}{nick})) != -1) && ($rand <= $high_chance)) {
  14. privmsg($src->{svr}, $chan, $wat2say);
  15. }
  16. else {
  17. if ($rand <= $chance) { privmsg($src->{svr}, $chan, $wat2say);
  18.  
  19. }
  20. }
  21. }
  22. }
Add Comment
Please, Sign In to add comment