fix: coerce Version for comparisons and bind server in !!c (26.9.3)

This commit is contained in:
SKYMirror committed 2026-09-13 03:25:33 +08:00
1 parent e1841c0fc9
commit b464b5ba5e
6 files changed
+44 -11

No files matched your search

+1 -1
View File
@@ -106,7 +106,7 @@ def do_calc(server: PluginServerInterface, src: CommandSource, context: dict) ->
def register(server: PluginServerInterface) -> None:
builder = SimpleCommandBuilder()
builder.command("!!c", lambda src: src.reply(RText(tr("calc_usage"), RColor.yellow)))
builder.command("!!c <expression>", do_calc)
builder.command("!!c <expression>", lambda src, ctx: do_calc(server, src, ctx))
builder.arg("expression", GreedyText)
builder.register(server)
server.register_help_message("!!c <expression>", tr("calc_help"))