Forgot to post the format of the nick file.
It is justs a txt file.

Example: 

Mark
*1
bot[*
cbl*


On Tue, 2003-08-19 at 16:49, John Hebert wrote:
> What _does_ your code snippet below do? Do you want help in debugging the
> code below, or do you want a working alternative?
> 
> BTW, I assume you meant to say below; "I have tried this code, but (it) does
> (not) do exactly what i need."
> 
> Your code snippet is surprisingly readable for Perl :) but I'm not quite
> sure what this line does:
> 
>                 if ($text =~ /User Connect (.*?)\ /)
> 
> What does it do?
> 
> Also, what is the format for the nicks.txt file?
> 
> I like seeing coding discussion on the list. It is an opportunity to learn
> for me. Let's have more of it! :)
> 
> Thanks,
> John Hebert
> 
> -----Original Message-----
> From: Wade
> To: [email protected]
> Sent: 8/19/03 2:52 PM
> Subject: [brlug-general] perl bot
> 
> Need more help with my bot.
> Hope one of you perl geeks can help me with this.
> I need the bot to search a file for nick or nick patterns and KILL the
> nick.
> 
> I have tried this code, but does do exactly what i need.
> 
> open(LOG, "<nicks.txt") or die ("Could not open log file.");
>               @nicks = <LOG>;
>                 if ($text =~ /User Connect (.*?)\ /) {
>                 $user = $1;
>                 chomp($user);
>                 foreach $pat (@nicks) {
>                  if ($user =~ /$pat/) {
>                 print $sock "PRIVMSG $mychan :DRONE\r\n";
>                 last;
> 
> the PRIVMSG is just to test the bot to get it to print DRONE when it
> matches a nick or pattern.
> 
> So what i need is, if i have "Mark" in the file , i need the bot to kill
> mark, or if i have *1 in the file in need the bot to kill every nick
> that ends in 1.
> 
> Sounds kinda useless , but the bot i wrote before this one working in
> conjunction with another service and I would like this bot to work by
> itself.
> 
> Wade
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://brlug.net/mailman/listinfo/general_brlug.net
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://brlug.net/mailman/listinfo/general_brlug.net
> 

Reply via email to