Commands for SerieBot

This script exposes the 4 commands used to control SerieBot http://code.google.com/p/seriebot/ - not tested.

first of all thx for this poy.
i have tested it but didnt have any luck with it.
When i use seriebot without the seriebot.lua loaded
then the commands work but when i load the seriebot.lua
then none of the seriebot commands work - not via RCMenu
and not when i type the command manuelly.
Cant provide an error message cause i didnt get any.

Tested with:
ADCH++ 2.5.0 mingw debug rev.353

the previous script swallows all commands and doesn’t forward them to SerieBot; here is a new version that i have tested.

Hi
Then i try this plugin now
it seams lock up all commands to seriebot
even if i write it manual in main on hub

/ Spader

it’s working fine for me;

  • have you adjusted the nick in the beginning of the script? seriebot_nick =

  • does it work if you write “+new” in PM to the serie bot?

Hi
Yes i have setup nick in script
and it works fine in PM to bot but not in main or with rightclick

/Spader

Doesnt work here when i use the RCMenu.
When i type +next or any other command in pm to the bot it works.

Tested with ADCH++ 2.5.0 mingw debug rev.353 and Seriebot 20100323

Ignore this post. Just want to get e-mails when something happens here… :slight_smile:

lol fat chance of that happening flow since sf doesn’t allow emailing :slight_smile: guess your just gonna have to pay attention instead

3rd try. i’m confident in this one. :slight_smile:

Hi
i get still get same problems
nothing happen on rc and in main
pm works fine

/Spader

This time it works for me. Thx poy.

ah good to know it works for 1 person besides me. :slight_smile:

are you sure you have the latest script, the right nick set etc Spader?
also, what scripts are referenced in your Scripts.xml?

here is a debug version that outputs some debug info about the script in the console. could help pinpoint where the problem is.

Hi
i found problem
it was script don´t like nick we choise

/Spader

tnx Poy for your script

--[[

    Name: Seriebot Commands 
    Author: Poy
    Version: 0.4
    Hubsoft: ADCH++
    Commments: Exposes commands for SerieBot <http://code.google.com/p/seriebot/>.
    
]] 

local seriebot_nick = 'Serie'

local user_command_menu = 'SerieBot'

local base = _G
module('seriebot')
base.require('luadchpp')
local adchpp = base.luadchpp
local autil = base.require('autil')
local string = base.require('string')

base.assert(base['access'], 'access.lua must be loaded and running before seriebot.lua')
local access = base.access

local cm = adchpp.getCM()

-- Forward commands to the bot.
local function command(name)
    return function(c, parameters)
        local bot = cm:findByNick(seriebot_nick)
        if bot then
            local msg = '+' .. name
            if #parameters > 0 then
                msg = msg .. ' ' .. parameters
            end
            bot:send(adchpp.AdcCommand(adchpp.AdcCommand_CMD_MSG, adchpp.AdcCommand_TYPE_BROADCAST, c:getSID())
            :addParam(msg))
        end
    end
end

access.commands.next = {
    command = command('next'),

    help = 'name',

    user_command = {
        name = user_command_menu .. autil.ucmd_sep .. 'Next',
        params = { autil.ucmd_line('Serie name') }
    }
}


access.commands.last = {
    command = command('last'),

    help = 'name',

    user_command = {
        name = user_command_menu .. autil.ucmd_sep .. 'Last',
        params = { autil.ucmd_line('Serie name') }
    }
}

access.commands.new = {
    command = command('new'),

    help = '- gives information on new episodes for series you are sharing',

    user_command = { name = user_command_menu .. autil.ucmd_sep .. 'New' }
}

access.commands.countdown = {
    command = command('countdown'),

    help = 'name',

    user_command = {
        name = user_command_menu .. autil.ucmd_sep .. 'Countdown',
        params = { autil.ucmd_line('Serie name') }
    }
}

access.commands.ignore = {
    command = command('ignore'),

    help = 'name - ignore series in the +serie_new command',

    user_command = {
        name = user_command_menu .. autil.ucmd_sep .. 'Ignore',
        params = { autil.ucmd_line('Serie name') }
    }
}

an update on the script to add the countdown command hope it works if not report it here