Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
irc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
irc
Commits
1d4fd5a1
Commit
1d4fd5a1
authored
8 years ago
by
Diego Martínez
Browse files
Options
Downloads
Patches
Plain Diff
Better method to avoid impersonation.
parent
6bf4e111
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hooks.lua
+3
-2
3 additions, 2 deletions
hooks.lua
with
3 additions
and
2 deletions
hooks.lua
+
3
−
2
View file @
1d4fd5a1
...
...
@@ -104,8 +104,9 @@ function irc.hooks.channelChat(msg)
irc
:
check_botcmd
(
msg
)
-- Don't let a user impersonate someone else by using the nick "IRC"
if
msg
.
user
.
nick
==
"IRC"
then
irc
.
sendLocal
(
"<IRC@IRC> "
..
text
)
local
fake
=
msg
.
user
.
nick
:
lower
():
match
(
"^[il|]rc$"
)
if
fake
then
irc
.
sendLocal
(
"<"
..
msg
.
user
.
nick
..
"@IRC> "
..
text
)
return
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment