@@ -0,0 +1,475 @@
+# coding=utf-8%0A%0A@yui.admin%0A@yui.command('sql')%0Adef sql(msg, user):%0A    split = msg.split(' ', 1)%0A    if len(split) %3C 2:%0A        return%0A%0A    try:%0A        c = yui.db.cursor()%0A        c.execute(split%5B1%5D)%0A        text = '%25s rows affected' %25 c.rowcount%0A        rows = c.fetchall()%0A        yui.db.commit()%0A        if len(rows) %3E 0:%0A            text = ''%0A            for r in rows:%0A                text += str(r)%0A        return text%0A    except Exception as e:%0A        return str(e)%0A

add sql plugin