summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-03-10 20:16:43 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-03-10 20:16:43 +0000
commit73703bd87a11ad7b104203461356f1e439a3da30 (patch)
tree691738bea5f0cbdad621a8ce80ec955e5eadde29
parentef264050c0989d05c1a418f91c8c82e5ff2e5fa5 (diff)
downloadirssi-73703bd87a11ad7b104203461356f1e439a3da30.zip
$server->values()->{'nick'} works fine without any
$sinfo = %{$server->values()}; $sinfo{'nick'} ugliness, fixed. make install didn't work in plugins/perl git-svn-id: http://svn.irssi.org/repos/irssi/trunk@137 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--docs/PERL30
-rw-r--r--examples/autorejoin.pl5
-rw-r--r--examples/privmsg.pl4
-rw-r--r--examples/quitmsg.pl3
4 files changed, 13 insertions, 29 deletions
diff --git a/docs/PERL b/docs/PERL
index 18adaacf..d3e59501 100644
--- a/docs/PERL
+++ b/docs/PERL
@@ -151,8 +151,7 @@ timeout_remove(tag)
Command::values()
Get some information about command. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"cmd" - Command
"category" - Category
@@ -176,8 +175,7 @@ Server::command_split(cmd, arg, max_nicks)
Server::values()
Get some information about server. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"address" - Address where we connected (irc.blah.org)
"real_address" - Who the server thinks it is (irc1.blah.org)
"port" - Port where we connected
@@ -311,8 +309,7 @@ irc_get_mask(nick, host, flags)
Channel::values()
Get some information about channel. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"name" - channel name
"type" - channel type ("channel", "query", "dcc chat", "empty")
"password" - channel password
@@ -351,8 +348,7 @@ Channel channel_find_level(level)
Ban::values()
Get some information about ban. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"ban" - The ban
"setby" - Nick of who set the ban
"time" - Timestamp when ban was set
@@ -390,8 +386,7 @@ Channel::modes_set(data, mode)
Nick::values()
Get some information about nick. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"nick" - Plain nick
"host" - Host (blah@there.org)
"name" - Real name
@@ -434,8 +429,7 @@ Dcc dcc_find_by_port(nick, port)
Netsplit::values()
Get some information about netsplit. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"nick" - Nick
"address" - Nick's host
"server" - The server nick was in
@@ -480,8 +474,7 @@ Server::rawlog_redirect(str)
Autoignore::values()
Get some information about autoignore. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"nick" - Ignored nick
"timeleft" - Seconds left to ignore
"level" - Ignoring level number
@@ -506,8 +499,7 @@ Server::autoignore_remove(mask, level)
Log::values()
Get some information about log. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"fname" - Log file name
"autoopen_log" - Automatically open log at startup
"last" - Timestamp when last write occured.
@@ -516,8 +508,7 @@ Log::values()
Logitem::values()
Get some information about logitem. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"name" - Log item name.
"level" - Logging level number.
@@ -550,8 +541,7 @@ Log::remove_item(log, name)
Plugin::values()
Get some information about plugin. This function returns a reference to
- hash table (FIXME: can't it return the hash table itself?!). Hash table
- has keys:
+ hash table. Hash table has keys:
"name" - Plugin name
"description" - Plugin description
diff --git a/examples/autorejoin.pl b/examples/autorejoin.pl
index 1dc4979a..d49dac3f 100644
--- a/examples/autorejoin.pl
+++ b/examples/autorejoin.pl
@@ -12,10 +12,7 @@ sub event_rejoin_kick {
# check if channel has password
$chanrec = $server->channel_find($channel);
- if ($chanrec) {
- %cvals = %{$chanrec->values()};
- $password = $cvals{'key'};
- }
+ $password = $chanrec->values()->{'key'} if ($chanrec);
$server->send_raw("JOIN $channel $password");
}
diff --git a/examples/privmsg.pl b/examples/privmsg.pl
index 97842f4b..999bd213 100644
--- a/examples/privmsg.pl
+++ b/examples/privmsg.pl
@@ -8,9 +8,7 @@ sub event_privmsg {
return if (!Irssi::is_channel($target));
- %sinfo = %{$server->values()};
- $mynick = $sinfo{'nick'};
-
+ $mynick = $server->values()->{'nick'};
return if ($text !~ /\b$mynick\b/);
$server->command("/notice $mynick In channel $target, $nick!$address said: $text");
diff --git a/examples/quitmsg.pl b/examples/quitmsg.pl
index 99c36247..6e296755 100644
--- a/examples/quitmsg.pl
+++ b/examples/quitmsg.pl
@@ -24,8 +24,7 @@ sub cmd_quit {
@servers = Irssi::servers;
foreach $server (@servers) {
- %svals = %{$server->values()};
- $server->command("/disconnect ".$svals{'tag'}." $quitmsg");
+ $server->command("/disconnect ".$server->values()->{'tag'}." $quitmsg");
}
}