Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

how do i make a /kick $nick ... using Net::IRC

by mr2 (Friar)
on Aug 10, 2002 at 10:15 UTC ( [id://189164]=perlquestion: print w/replies, xml ) Need Help??

mr2 has asked for the wisdom of the Perl Monks concerning the following question:

for example i do: # /msg #channel re $self->privmsg($channel, 're'); # /mode #channel +o mr2 $self->mode($channel,'+o','mr2'); # /quit message $self->quit('message'); & how do i make /kick #channel mr2 ?

Replies are listed 'Best First'.
Re: how do i make a /kick $nick ... using Net::IRC
by Corion (Patriarch) on Aug 10, 2002 at 10:23 UTC

    I haven't used (or installed) Net::IRC, but from looking at the source presented at http://www.speakeasy.org/~cgires/trading/Net/Connection.pm, I assume that

    $self->kick($channel, $nickname, $reason);

    should do the trick. For commands not directly supported by Net::IRC, the sl command prints a raw string directly to the server - but you'll have to build the string with the command and the quoted text yourself then.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web

      and how to get /whois $nick ?

      i haven't found it in example that comes with Net::IRC module

        well, by doing the same as Corion above and looking through the source (I haven't used or installed Net::IRC either), I would assume that
        $self->whois($nick);
        should do the trick
Re: how do i make a /kick $nick ... using Net::IRC
by Corion (Patriarch) on Aug 10, 2002 at 22:35 UTC

    You might really want to read RFC 1459 ("The Internet Relay Chat Protocol"), as it details what should and shouldn't be done as a client. Another helpful resource might be http://www.irchelp.org/. The source code of Net::IRC should also prove a wealth of information, as most interesting commands (for a bot) should already have found their way into it - and, not really surprising, the names for the commands are the same as the commands in the clients, which are, even less surprisingly the same as the commands sent over to the server.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
      thnx for help! ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://189164]
Approved by BrowserUk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-16 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found