NAME
Win32::mIRC - Communicate with mIRC via DDE
SYNOPSIS
#!/usr/bin/perl
use strict;
use warnings;
use Win32::mIRC qw( :all );
connect('irc.zirc.org',6667,'#test',1);
DESCRIPTION
This module provides functions for controlling mIRC via DDE.
Functions
- command
-
Returns a new mIRC COMMAND connection. You can use this to Execute commands in mIRC.
my $command = command(); $command->Execute('/say Hello from Perl!');
- evaluate
-
Returns a new mIRC EVALUATE connection.
my $evaluate = evaluate(); my $anick = $evaluate->Request('$anick'); print "You're alternate nickname is $anick\n";
- connect(SERVER, PORT, CHANNEL, ACTIVE)
-
Connects to the specified server, port and channel. ACTIVE is a boolean value that specifies whether or not mIRC should make that window active.
Note: This will disconnect you if you are currently connected to a server. This command cannot be used to initiate multi-server mode. See multiserver.
- connected
-
Returns the connection status: "connected" if you're connected to a server, "connecting" if you're in the process of connecting to a server, and "not connected" if you're not currently connected to a server.
- exename
-
Returns the full path and name of the mIRC EXE file. eg. "c:\mirc\mirc.exe".
- version
-
Returns mIRC's version info.
- inifile
-
Returns the full path and name of the main INI file that is being used. eg. "c:\mirc\mirc.ini".
- nickname
-
Returns the nickname currently being used.
- server
-
Returns the server to which you were last or are currently connected. eg. "irc.undernet.org"
- port
-
Returns the port currently being used to connect to the irc server.
- channels
-
Returns a single line of text listing the channels which you are currently on separated by spaces. eg. "#mirc #mircremote #irchelp"
- users(CHANNEL)
-
Returns a single line of text listing the users on the specified channel separated by spaces.
- connections(REQUEST)
-
Returns the number of open connections. (Multi-server) REQUEST is an mIRC REQUEST connection.
- networks(REQUEST)
-
Returns a list of the networks currently connected. REQUEST is an mIRC REQUEST connection.
- servers(REQUEST)
-
Returns a list of the servers currently connected. REQUEST is an mIRC REQUEST connection.
- cid(CONNECTION NUMBER)
-
Returns a connection id based on the connection number passed.
- scid(CMDOBJ, CID, COMMAND)
-
Changes the active connection for a script to connection id N, where N is a $cid value.
CMDOBJ is an mIRC COMMAND connection object.
CID is either a connection id or a switch.
COMMAND is the mIRC command you wish to run.
All commands after the scid command will be performed on the new connection id.
If you specify the command parameter, the connection id is set only for that command.
The -r switch resets the connection id to the original id for that script.
The -a and -tM switches can only be used if you specify a command.
The -a switch performs the command on all connection ids.
The -tM switch limits the command to being performed only on servers with a certain connection status, where M is an or'd value of 1 = server connected, 2 = not connected, 4 = connecting, 8 = not connecting.The command is only performed if M matches the connect status of the connection id.
The -s makes any called commands or identifiers show their results.
- scon(CMDOBJ, CONN, COMMAND)
-
The scon command works in exactly the same way, except that CONN represents the Nth connection, not a connection id value.
- multiserver(CMDOBJ, NETWORK)
-
This allows you to connect to a new server in multi-server mode.
CMDOBJ is an mIRC COMMAND connection object.
NETWORK is a string containing the network (or optionally the server) to connect to.
BUGS
None that I know of.
AUTHOR
Matthew Musgrove CPAN ID: MMUSGROVE <muskrat@mindless.com> http://mrmuskrat.perlmonk.org
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Win32::DDE::Client http://www.mirc.com
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 265:
You forgot a '=back' before '=head1'