summaryrefslogtreecommitdiffstats
path: root/index.html
blob: 0b7d4e64dfea02600ae4f3f502b47add2505b012 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html><head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">

    <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
    <link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
    <link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">

    <link href="stylesheets/prettify.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="javascripts/prettify.js"></script>

    <title>antitech.github.com by antitech</title>
</head>

<body onload="prettyPrint()">

<header>
    <div class="container">
        <h1>warmachine</h1>
        <h2>a python developer's irc bot</h2>

        <section id="downloads">
            <a href="https://github.com/antitech/warmachine/" class="btn btn-github">
                <span class="icon"></span>Source Code</a>
        </section>
    </div>
</header>

<div class="container">
    <section id="main_content">
        <h3>download</h3>

        <pre><code class="prettyprint">$ git clone git://github.com/antitech/warmachine.git</code></pre>

        <h3>no bullshit.</h3>

        <p>The philosophy behind warmachine is to get out of your way and let you code. A developer shouldn't be required to learn an oversized API just to print hello world on the screen. You know Python, so you know how to write warmachine plugins. All you have to do is write a method that listens for your trigger and go on about your day.</p>

        <pre><code class="prettyprint">from wmd.actions import Action

class HelloWorldAction(Action):

    def recv_msg(self, irc, obj_data):
        channel = obj_data.get_username()
        args = obj_data.params.split(" ")
        if "PRIVMSG" in obj_data.command and ":!helloworld" in args[1].lower():
            irc.privmsg(channel, "Hello World!")
        </code></pre>

</div>




</body></html>