Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This thing is supposed to sort the hash of nicks who have spoken by the number of lines they've
- # said, and then take every nick who has more than 200 lines (most nicks have less than 200 lines)
- # and if the line they just said contains one of those nicks, the person who wrote the var containing
- # the number of times he/she has pinged someone goes up.
- $nick = "Takonub02"; # This is someone who talks a lot.
- $saying = "LOL NICK IS A NUB"; # This is something Tako has said.
- %lines = ( # This is a hash of nicks and how many lines they've said.
- "every", 1234,
- "nick", 2345,
- "in", 3456,
- "#cs", 4567);
- foreach my $lcount (sort {$lines{$b} cmp $lines{$a}} keys %lines) # This is a loop of some sort.
- {
- if ($lcount < 100) # If you don't have more than 100 we don't care if you get pinged.
- {
- last;
- }
- else
- {
- if (index(lc(saying), lc($lines{$lcount})) != -1) # If someone's name was said
- {
- $ping{$nick}++; # Then nub just pinged someone.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement