diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2007-09-04 21:58:27 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2007-09-04 21:58:27 -0500 |
commit | 16a65213dcafa306f3d901762d36751a3f456979 (patch) | |
tree | fa06dcc28b49fef1ff687886f7d4aabcdcaa1f36 /src/irc/misc.lua | |
parent | 9e7fab4e4c1bd7b179b3fd72a40b1d9c3a669e3b (diff) | |
download | luairc-16a65213dcafa306f3d901762d36751a3f456979.tar.xz |
convert parse_user to an internal function, since apparently that's how i've been using it
Diffstat (limited to 'src/irc/misc.lua')
-rw-r--r-- | src/irc/misc.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/irc/misc.lua b/src/irc/misc.lua index bf4a671..92c3ac4 100644 --- a/src/irc/misc.lua +++ b/src/irc/misc.lua @@ -273,17 +273,15 @@ function _value_iter(state, arg, pred) return val end -- }}} --- }}} --- public functions {{{ --- parse_user {{{ ---- +-- _parse_user {{{ +-- -- Gets the various parts of a full username. -- @param user A usermask (i.e. returned in the from field of a callback) -- @return nick -- @return username (if it exists) -- @return hostname (if it exists) -function parse_user(user) +function _parse_user(user) local found, bang, nick = user:find("^([^!]*)!") if found then user = user:sub(bang + 1) |