Comments (2)
I'm not able to reproduce. Got the following code (from the template):
# -*- coding: utf-8 -*-
from irc3.plugins.command import command
import irc3
from tinydb import TinyDB
print(TinyDB)
@irc3.plugin
class Plugin(object):
def __init__(self, bot):
self.bot = bot
@irc3.event(irc3.rfc.JOIN)
def say_hi(self, mask, channel, **kw):
"""Say hi when someone join a channel"""
if mask.nick != self.bot.nick:
self.bot.privmsg(channel, 'Hi %s!' % mask.nick)
else:
self.bot.privmsg(channel, 'Hi!')
@command(permission='view')
def echo(self, mask, target, args):
"""Echo
%%echo <message>...
"""
yield ' '.join(args['<message>'])
And it print:
% ./bin/irc3 -rv config.ini 1 ↵
DEBUG irc3.toto Register plugin 'irc3.plugins.command.Commands'
DEBUG irc3.toto Register plugin 'irc3.plugins.core.Core'
DEBUG irc3.plugins.command Config: {'guard': u'irc3.plugins.command.mask_based_policy', 'cmd': u'!', 'hash': u'#'}
DEBUG irc3.plugins.command Guard: mask_based_policy
DEBUG irc3.plugins.command Masks: {'*': u'view', 'hash': u'#'}
DEBUG irc3.toto Register command 'help'
DEBUG irc3.toto Register command 'ping'
<class 'tinydb.database.TinyDB'>
from irc3.
Shoot! Alright, must be something in my environment then.
Thanks!
from irc3.
Related Issues (20)
- Hide commands from `plugins.command` HOT 4
- Handle several hosts in a configuration file HOT 3
- Builtin authentication plugin HOT 2
- builtins.LookupError: Not able to resolve HOT 2
- Add Python 3.7 to setup.py
- getaddrinfo for res in _socket.getaddrinfo error HOT 7
- irc3.plugins.logger.handler HOT 1
- KeyError: irc3.plugins.userlist in new_nick HOT 2
- iotype='out' doesn't seem to be working. HOT 3
- DCC GET seems not work HOT 6
- irc3.plugins.autojoins: join after kick delay HOT 2
- Run in a specific event loop HOT 2
- Split long messages to avoid being kicked for excess flood HOT 10
- Logger plugin not logging join event for anyone except the bot itself HOT 3
- docopt's option's description and [options] shortcut aren't working HOT 2
- Incompatibility with Python 3.10
- python 3.10 not supported HOT 1
- Support for generator-based coroutines is deprecated and is removed in Python 3.11. HOT 4
- External command output not relayed to IRC channel HOT 1
- Crtical errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irc3.