if you're in IRC and you wanna bring up a wiki section for discussion, type:
[[title|section]]
to output the wiki page section
eg:
[[IRC|Chat bot (Python)]]
outputs:
<exec> ELIZA module that uses Futurama personalities (to match the bot's current nick) Modify bot logging to match existing formats (mIRC preferably)
<exec> http://wiki.soylentnews.org/wiki/IRC#Chat_bot_.28Python.29
one of the things i'm working lately is a bitbucket feed for soylent irc (similar to the #github feed)
it currently polls the events api url for one repo (uselessd) every 5 mins and spits out a message to #github if new code is pushed
i'm still trying to figure out how to relate changesets to commits listed in push events so that i can list affected files similar to the github feed. neither the atlassian api help nor google have been very helpful.
--
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/bitbucket_feed.php
http://sylnt.us/exec
The long and short of it is, there won't be one. We're pushing it until January due to me and PJ being occupied too much with holiday and Life stuff.
What you can look forward to:
Not a final version and we haven't touched meta-moderation yet but this will cut down on the echo chamber effect, mod bombing, and lay some groundwork for combating spam as well.
Currently if you put html entities in and hit preview they get transformed into literal characters. There's also wackiness if you try to put double quotes in a submission title. I hate this, you hate this, and it needed to stop so most of the code for it is already done and being tested on dev.
There is really no reason to have http links in the rss feed rather than https links, so they're changing. I'm also doing my best to get them to encode only the necessary characters and display properly but it seems like no two readers display the same.
Occasionally I get bored and do up a theme instead of actually working. This time around we have the VT100 and the OMG PWNIES themes. These are actually pretty easy to do. Feel free to mod and submit your own. All it takes is a custom stylesheet if you're okay with reusing existing favicons/logos.
We're adding standard support for sub/sup/abbr/strike tags. We're also adding support for the custom tags sarc/sarcasm and two forms of a "user" tag.
Bunch of minor bugs, some of which you would have never seen because they were on admin pages.
I think that's all but I'm not sure what the last one that went into our point release after the 14.12 update was.
the "~x" alias allows a bot operator to create and manage scripts from within IRC (dubbed "live scripts")
scripts created using this alias are stored in a bucket by the bot instead of a file
the handler uses php's eval to run live scripts
to prevent anyone from executing arbitrary commands on the bot host, a whois command is issued to verify that the NickServ account of the user of the ~x alias is the bot operator (by settling the userlist parameter of the alias definition line to "@")
the general form of the command is:
~x %action% [%param%] [%code%]
in a nutshell the possible actions and params are:
"global on|off" (enables or disables all live scripts)
"kill" (a shorcut for disabling all live scripts)
"enable %script-name%" (enables an individual live script)
"disable %script-name%" (disables an individual live script)
"delete-script %script-name%" (deletes a live script from memory)
"open %script-name%" (opens a live script for editing in the active channel)
"close" (closes the currently open live script in the active channel)
"code" (outputs a line-numbered code listing of the currently open live script in the active channel)
"list" (outputs a listing of available live scripts, and highlights enabled scripts)
"replace [L]%line-number% %old-code%|%new-code%" (replaces a line of code in the currently open live script)
"delete-line [L]%line-number%" (deletes a line of code in the currently open live script)
"insert [L]%line-number% %code%" (inserts a line of code in the currently open live script)
"add %code%" (adds a line of code to the currently open live script)
import and export (from/to file) actions are also proposed but not yet implemented.
live scripts have access to common lib functions used by other scripts, and also have direct access to $nick, $dest (channel), $trailing. the privmsg lib function doesn't work for live scripts as the live script handler is triggered internally by the bot using a registered privmsg event handler, so to privmsg the channel that the sender ($nick) is in you simply call pm($dest,"message) instead.
when a new live script is created, it must be enabled before it will run, but once enabled any changes will come into affect immediately.
whilst the code is currently limited to php, it could potentially be adapted to execute code in other languages using their command-line interpreters. it also doesn't have to be limited to code. it could potentially be used to collaborate on lines of non-executing text (such as for collaborative editing of SN submissions). with some tweaks it could be possible to collaborate on code as well, with other users being able to add/edit/delete lines but requiring the operator to re-enable the script for changes to come into effect.
ps: exec also now supports init: in-script directives, similar to startup: and exec: directives, which will increase self-containment of scripts further.
--
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/scripting.php
http://sylnt.us/exec
http://sylnt.us/execsrc
can now specify commands to run at startup inside scripts in a similar fashion to alias definitions
startup commands are read from one or more directives in the main exec file:
startup ./scripts
this uses the same (now more generalized) code as alias definitions; recursively searching files in the specified path for "startup:" directives (similar to "exec:" directives). like exec directives, startup directives must occur at the start of a line, so should be put in multi-line comment (below exec directive usually).
startup directives are stored until the bot identifies with NickServ, at which point the "<startup>" reserved alias is triggered followed by commands from startup directives run.
startup commands are like what you would type in IRC channels, but in this case they are intercepted by the bot and don't get transmitted to the IRC server. you can have any number of startup directive lines in a file.
example (php exec script):
/*
exec:~privmsg-internal|5|0|0|1||INTERNAL||0|php scripts/privmsg.php %%trailing%% %%nick%% %%dest%%
startup:~privmsg-internal register-events
*/
startup directives are good for triggering event registration handlers in the script, and pretty much makes a script self-contained (for now anyway).
--
http://sylnt.us/exec
http://sylnt.us/execsrc
commit for this feature: https://github.com/crutchy-/exec-irc-bot/commit/a3bb41c0d6eced1b6ec6e6573370f3db7129ccaa
Warning: if you suffer from depression, don't read this. It might mess with your head. Not kidding.
This is probably the first time I've written to you, universe. I may have prayed to God or others, but I doubt I've spoken to you before.
I need to drop on my knees, and sob out my thanks to god for Prozac 60mg. I've suffered more than I imagine near anyone else can comprehend. It's such a sick, bent agony laced with petrifying fear, covered in 'my-universe-is-broken' sauce. The OCD I was dealt in 2011 is the most indescribable hell I can imagine. I can laugh at the atrocities I see on the news because I would have traded places for something as simple and benign as physical pain, the pain of four broken limbs or having my skin peeled off with a steak knife. Instead I was given 24-hour terror equivalent to being eaten alive by a monster. I wanted to die so bad during this. I wanted to die so badly.
I was alive for my family but even their need was getting to not be enough to justify my living in this carnival from hell.
So as you know I ended up in a crisis center in September, right in time for 9/11, and was put on several medications, none of which worked, and one (Invega, the only antipsychotic they tried), actually made it far worse. Then they gave me the Prozac. I knew that SSRIs needed to be a high dose to help OCD, so I bothered them until they raised it to 60mg.
It took the month and a half to start working they said it would. A little longer.
We both know I was not given the hand-washing or germ phobias with my OCD, I was given the horrible obsessive existential stuff, the really horrible painful questions that I'd obsess over until every fiber of my being believed them to be true. The kind of stuff that can blacken your sky and make you feel like you're falling into an infinite pit of pitch black tar. The stuff that makes you want to die, but be too afraid of what nightmare would await you if you did. The one the sufferers called Pure-O. I suppose I deserve some positive reward for living through this at all, or perhaps just an absence of punishment for a while, since if I wasn't wanted by family and friends, I'd be two years dead by now.
I'm writing this because I want to tell you what I need now. I hope you'll give it to me. As you know, the last few months, during my recovery, I've stopped all work, all projects, all programming and just played Warzone 2100 all day. I've gotten as good as I was before. I'm happy for the first time in years. I plan to start my work again soon, but I need some guarantees from you before I do so.
The first thing is, as an example, my famous gerbil jokes, such as 'fear the gerbils', no longer appeal to me, because I've had enough fear. Horror movies are no longer something I watch, I don't enjoy Halloween anymore, and although you know that historically I've preferred sad music when sad, now, I find myself playing uplifting songs in an attempt to drown out the memories. Christmas is probably forever ruined for me because of the onset of the OCD that time in 2011. Kinda a PTSD thing going on there.
Whenever I hear a christmas song, instant trip down memory lane from hell.
Fourth of July is ruined too thanks to my relapse in July this year.
I want to be surrounded by joy, by kindness, by peace, by good things. I have seen enough of the other side of the spectrum for this lifetime.
I want to be loved, and to love others, I want to have a fulfilling and useful purpose and still have time for myself.
I want to be followed by a hundred billion times more light than I ever was darkness.
The tagline at the bottom of the site today says "Today is the first day of the rest of the mess.", but I vehemently disagree. Today is the first day of the rest of my life, and it's going to be good now, because I deserve it. I've paid my dues. I'd just like your blessing for the good plan I've laid out, and your help in making it come to pass.
Sincerely, SubsentientneitnesbuS.
added an include feature when loading/rehashing the main exec file (https://github.com/crutchy-/exec-irc-bot/blob/master/exec.txt).
syntax is:
include %filename%
%filename% can be a path, which will recurse to include any readable files contained.
it can also be a relative path (to the main bot script, irc.php):
include ./scripts
when including a file, the bot will read the contents of the file and look for any line beginning with "exec:" and will treat whatever follows as an alias definition (exec line).
to use this feature in a script (without borking the script) you just enclose the line in a comment. the exec directive must be on its own line, so it won't work as an EOL comment.
this means an alias definition (exec line) can be stored in individual scripts in any language that supports multi-line comments.
example (from https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/irciv/irciv.php):
/*
exec:~civ|30|0|0|1||||0|php scripts/irciv/irciv.php %%nick%% %%trailing%% %%dest%% %%start%% %%alias%% %%cmd%%
*/
if you create a new script, you can either add an include directive in the main exec file and issue a ~rehash command in irc, or if you already have a directory in the main exec file you can just issue a ~rehash after you save your script.
the aim of this feature is to enable scripts to become more self-contained.
anyway, thanks for reading and have a great weekend.
A quick and dirty voting script has been developed for use in Soylent IRC.
Voting syntax for users identified with NickServ is:
~vote <poll_id> <option>
More info on how to use it can be found here:
http://sylnt.us/vote
There is now a feed set up in the #github channel on SoylentNews IRC for reporting push, pull and issue events for SoylentNews/slashcode, and push events for some other SN user and staff repos.
The feed works by querying GitHub API URLs every 15 minutes.
moved nick tracking inside bot process cos i was having all sorts of grief trying to make it work the way i wanted in a separate script. seems to work pretty smoothly now, and i don't need to worry about pausing/unpausing the socket reader.
starting fidgeting with irciv again now that i got some reliable generic authentication features. trying to consolidate all actions into a single alias and get player authentication back up.
event response is a bit more readily available to scripts with event handler registration. the bot keeps track of command/handler pairs in an encoded bucket, and on various events the register is queried and any handlers that exist are executed. this opens up possibility to have the bot trigger a script on an event without using the exec.txt file, and as the register is a bucket it can also be edited from within irc. will have to think about what sort of security risks this might pose, but ability to manually edit buckets is limited to privileged users so not overly worried. irciv will register event handlers on startup to manage player tracking, which was formerly done in cmd.php (eventually want to remove cmd.php, to be replaced with registered event handlers in startup.php). some templates are supported in event handlers; %%nick%%, %%trailing%%, %command%% and %%params%%, which are replaced with actual values when the handled event occurs
a little SN funding feed has been enabled. polls home page slashbox every 15 mins. message appears in #soylent if funding amount increases
comment feed has been changed to use simpler xml feed and only top 20 articles are scraped, as i found the latter 30 articles never got that many comments (assuming probably cos they fall off the SN front page). /join #comments
--
http://sylnt.us/exec
https://github.com/crutchy-/exec-irc-bot