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
2f55e0f9
Commit
2f55e0f9
authored
8 years ago
by
Diego Martínez
Browse files
Options
Downloads
Patches
Plain Diff
Add option to broadcast kick messages.
Default value is false.
parent
78fbe26a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
chatcmds.lua
+13
-0
13 additions, 0 deletions
chatcmds.lua
config.lua
+1
-0
1 addition, 0 deletions
config.lua
settingtypes.txt
+3
-0
3 additions, 0 deletions
settingtypes.txt
with
17 additions
and
0 deletions
chatcmds.lua
+
13
−
0
View file @
2f55e0f9
...
...
@@ -119,3 +119,16 @@ minetest.chatcommands["me"].func = function(name, param, ...)
return
oldme
(
name
,
param
,
...
)
end
if
irc
.
config
.
send_kicks
and
minetest
.
chatcommands
[
"kick"
]
then
local
oldkick
=
minetest
.
chatcommands
[
"kick"
].
func
-- luacheck: ignore
minetest
.
chatcommands
[
"kick"
].
func
=
function
(
name
,
param
,
...
)
local
plname
,
reason
=
param
:
match
(
"^(%S+)%s*(.*)$"
)
if
not
plname
then
return
false
,
"Usage: /kick player [reason]"
end
irc
:
say
((
"*** Kicked %s.%s"
):
format
(
name
,
reason
~=
""
and
" Reason: "
..
reason
or
""
))
return
oldkick
(
name
,
param
,
...
)
end
end
This diff is collapsed.
Click to expand it.
config.lua
+
1
−
0
View file @
2f55e0f9
...
...
@@ -36,6 +36,7 @@ setting("string", "sasl.pass") -- SASL password
setting
(
"string"
,
"channel"
,
nil
,
true
)
-- Channel to join
setting
(
"string"
,
"key"
)
-- Key for the channel
setting
(
"bool"
,
"send_join_part"
,
true
)
-- Whether to send player join and part messages to the channel
setting
(
"bool"
,
"send_kicks"
,
false
)
-- Whether to send player kicked messages to the channel
-----------------------
-- ADVANCED SETTINGS --
...
...
This diff is collapsed.
Click to expand it.
settingtypes.txt
+
3
−
0
View file @
2f55e0f9
...
...
@@ -53,6 +53,9 @@ irc.sasl.pass (SASL password) string
# or leave the game server.
irc.send_join_part (Send join and part messages) bool true
# Enable this to make the bot send messages when players are kicked.
irc.send_kicks (Send kick messages) bool false
# Underlying socket timeout in seconds.
irc.timeout (Timeout) int 60 1
...
...
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