summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2025-02-23 23:43:28 +0000
committerubq323 <ubq323@ubq323.website>2025-02-23 23:43:28 +0000
commit7d396195e4f97a094610fecc658aed6a67fd464d (patch)
tree9439b9c9f0ba87b8b3f7a10a5d116de32a55e21f
parent989b6349b0c7e5a0d7ec06d2ca24d629c618fe12 (diff)
parse_src improve
-rw-r--r--rirc.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/rirc.lua b/rirc.lua
index 95445ad..0508351 100644
--- a/rirc.lua
+++ b/rirc.lua
@@ -55,12 +55,7 @@ function irc.parse(line)
end
function irc.parse_src(src)
- local s, _, nick, user, host = src:find("^(.*)!(.*)@(.*)$")
- if s then
- return true, nick, user, host
- else
- return false
- end
+ return src:match"^(.*)!(.*)@(.*)$"
end
return irc