[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mirc /omsg vs /onotice



You can use the IRC::print_with_channel() function to put the text in
whatever tab you like.  This isn't listed in the online docs I don't
think.  The format is:

IRC::print_with_channel(text-string, tab-name, server)

where server is a string in the format as returned by IRC::get_info(3)

Hope that helps!


Paydon



On Mon, 2002-06-10 at 21:52, imbezol wrote:
> I've noticed that mirc uses both /omsg and /onotice to send messages to
> all the ops in a channel. Now ideally the mirc users would know that
> these two commands are not the same and that /onotice would send a
> message in the channel window and be seen only by ops, while /omsg would
> send a private msg to all the ops. Unfortunately mirc doesn't
> distinguish between these commands like this and put them both in the
> channel for all ops to see like an /onotice. So what's the problem? Most
> mirc users do /omsg not /onotice to discuss things in op chat in the
> channel. X-Chat however receieves /omsg messages privately and opens a
> new tab for each person speaking with it. This makes it very difficult
> to follow a conversation in opspeak. Anyone know a way to get messages
> that are sent as "user: @#chan message" to show in the channel window
> like mirc does instead of in a private tab? I can't even imagine trying
> to fight with mirc users to get them to use the proper command
> (/onotice). I'm including a small script that a friend wrote.. if you
> know of a way to modify this to put the message into the correct window
> rather than the server tab that would be appreciated too. Thanks.
> 
> IMbeZOL
> 
> perl script:
> 
> #!/usr/bin/perl -w
> 
> # Copyright (C) 2002 Robert Helgesson <rycee at home dot se>
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> # the Free Software Foundation; either version 2 of the License, or
> # (at your option) any later version.
> #
> # This program is distributed in the hope that it will be useful,
> # but WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> # GNU General Public License for more details.
> #
> # You should have received a copy of the GNU General Public License
> # along with this program; if not, write to the Free Software
> # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> USA.
> 
> use strict;
> 
> IRC::register("omsg", "0.0", "", "");
> 
> IRC::add_message_handler("PRIVMSG", "in_msg");
> 
> IRC::print("\0033:: omsg stuff loaded ::\003\n");
> 
> sub in_msg
> {
> 	my ($line) = @_;
> 
> 	$line =~ m/\:(.*?)\!.*?\sPRIVMSG\s(.*?)\s\:(.*)?/;
> 
> 	my $nick = $1;
> 	my $to = $2;
> 	my $msg = $3;
> 
> 	return 0 unless ( $to =~ /^@/ );
> 
> 	IRC::print("OMSG: $nick - $to - $msg");
> 
> 	return 1;
> }
> 
> 
> 
> --
> XChat-discuss: mailing list for XChat users
> Archive:       http://mail.nl.linux.org/xchat-discuss/
> 
> 


--
XChat-discuss: mailing list for XChat users
Archive:       http://mail.nl.linux.org/xchat-discuss/