Open sapphire-arches opened 10 years ago
pull - not linux-specific, this could theoretically use msysgit (I think) version - same case wtf - we're going to need to create a database of acronyms ping - probably platform-specific command (if posix then ping -c1, else ping -whateverthethingisinwindows) gcc, eix, errno - like you said bc - we can write a simple expression parser for this one
Or do what weechat does and require it be run in cygwin :P That way !bc and a couple others will still work.
-----
On Wed, Jan 15, 2014 at 10:33 PM, fwilson42 notifications@github.comwrote:
pull - not linux-specific, this could theoretically use msysgit (I think) version - same case wtf - we're going to need to create a database of acronyms ping - probably platform-specific command (if posix then ping -c1, else ping -whateverthethingisinwindows) gcc, eix, errno - like you said bc - we can write a simple expression parser for this one
— Reply to this email directly or view it on GitHubhttps://github.com/tjcsl/cslbot/issues/678#issuecomment-32439700 .
@TechFilmer That is a terrible terrible idea - most of the bot is OK outside of POSIX environments, with the exception of these few commands.
There is no way in hell that cygwin should be a requirement
Alias !math to !wolf perhaps? That'll fix !bc's issue.
that's really tangential to this issue.
How about using eval without any functions defined?
We would have to be REALLY careful about that, but if it's implemented safely and securely that would work. Fast too compared to wolfram alpha.
I took a look at doing that safely (it didn't work), but i'm not sure that this is enough of an issue to justify running eval on user input.
Maybe if it doesn't return an int we don't send the output?
-----
On Thu, Mar 20, 2014 at 10:10 PM, Peter Foley notifications@github.comwrote:
I took a look at doing that safely (it didn't work), but i'm not sure that this is enough of an issue to justify running eval on user input.
— Reply to this email directly or view it on GitHubhttps://github.com/tjcsl/cslbot/issues/678#issuecomment-38242542 .
do you have the slightest clue what eval does?
That's even worse... Supybot has some code to do this sort of thing -- let's look at that.
Commands that currently rely on such trickery [ ] bc [ ] ddate [ ] eix [ ] errno [ ] fortune [ ] gcc [ ] ping [ ] pull [ ] version [ ] wtf
Some of these obviously can't be written platform-agnosticly (for things like
eix
,errno
andgcc
it makes no sense) but I think a few of these should definitely be doable.At the very least we can provide nice messages when things fail