42wim / mm-go-irckit Goto Github PK
View Code? Open in Web Editor NEWThis project forked from shazow/go-irckit
Minimal IRC server (and maybe client) toolkit for Go.
License: MIT License
This project forked from shazow/go-irckit
Minimal IRC server (and maybe client) toolkit for Go.
License: MIT License
The commit 816784b disables the check which ensured that a command has enough parameters. This results in panics when a user requests an api
command with a single argument (for example api help
):
panic: runtime error: slice bounds out of range
The offending code is this block:
if strings.ToLower(args[0]) == "get" {
r, err = u.mc.Client.DoApiGet(args[1], "", "")
} else {
r, err = u.mc.Client.DoApiPost(args[1], strings.Join(args[2:], " "))
}
The fix is obvious, but I don't know enough about the intent of the api
command and why get
is handled specially to be able to offer a suitable patch.
The original Slack IRC bridge converted user names with spaces in them to use underscores, to comply with the IRC protocol. mm-go-irckit instead sends messages where usernames and hostmasks can contain spaces in violation of the IRC protocol's formal grammar. It should convert them transparently the same way Slack's IRC bridge did.
Referencing 42wim/matterircd#150
Presently, matterircd displays the users's name instead of display name in the name list, as well as in "@" mentions name = myname
, should use display_name = mycoolnickname
e.g. on an '@' mention from matterircd to slack:
@myname
, should use @mycoolnickname
When a user on the Slack interface (web and app) "@" mentions another user, matterircd displays the user's id, e.g. <@W012A3CDE> message
Reference: https://api.slack.com/methods/users.list
See 42wim/matterircd#116 for the original issue.
Looking at this, it appears that the handleServiceBot method, uses strings.Fields to parse out the various supported IRC commands.
commands := strings.Fields(msg)
I'm looking to replace that with a modified "shellwords" like parser, that doesn't do environment expansion, but does correctly handle quoted strings.
It would allow for logins like:
login user password
login server user password
login user 'long password'
login server team user 'long password'
Just want to make sure this is a reasonable route before I dig into it.
Hiya, just noticed this fork. I see you have some mattermost-specific stuff in here, but if you're interested in backporting the go-irckit improvements, I would welcome that. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.