Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub on_cprivmsg {
- my ($src, $chan, @msg) = @_;
- $fullmsg = join ' ', @msg;
- $bot->learn($fullmsg);
- $rand = int(rand(100));
- $wat2say = $bot->reply($fullmsg);
- if (substr($wat2say, 0, 1) eq '!') {
- while (substr($wat2say, 0, 1) eq '!') {
- $wat2say = $bot->reply($fullmsg);
- }
- }
- if ($talk == 1) {
- if (((index($fullmsg, $State::IRC::botinfo{$src->{svr}}{nick})) != -1) && ($rand <= $high_chance)) {
- privmsg($src->{svr}, $chan, $wat2say);
- }
- else {
- if ($rand <= $chance) { privmsg($src->{svr}, $chan, $wat2say);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment