pimpdb = {}

def declare():
    return {"pimp": "privmsg"}

def callback(self, type, isop, command="", msg="", user="", channel="", mode=""):
    if channel.startswith('#'):
        u = user.split('!')[0]

        var = msg.split()

        try:
            target = var[1]
        except:
            target = u

        try:
            com = var[2]
        except:
            com = 'get'

        if u == target and com != 'get':
            self.msg(channel, "%s: Y'all can't pimp yourself, ma nigga" % (u))
            return


        if com == '+1':
            try:
                pimpdb[target] += 1
            except:
                pimpdb[target] = 1

        elif com == '-1':
            try:
                pimpdb[target] = pimpdb[target] - 1
            except:
                pimpdb[target] = -1

        elif com == 'get':
            try:
                pimp = pimpdb[target]
                if pimp > 0:
                    self.msg(channel, "that nigga got %s pimp points up in this bitch" % (pimp))
                else:
                    self.msg(channel, "that nigga got %s bitch points" % (pimp))
            except:
                self.msg(channel, "that nigga ain't got no pimp points")

        else:
            self.msg(channel, "%s: Nigga, you really think you that og, just giving out more points like that?" % (u))

@@ -583,32 +583,41 @@
          pimpdb%5B
+channel%5D%5B
 target%5D += 1%0A   
@@ -641,38 +641,185 @@
                 
-pimpdb
+try:%0A                    pimpdb%5Bchannel%5D%5Btarget%5D = 1%0A                except:%0A                    pimpdb%5Bchannel%5D = %7B%7D%0A                    pimpdb%5Bchannel%5D
 %5Btarget%5D = 1%0A%0A  
@@ -874,32 +874,41 @@
          pimpdb%5B
+channel%5D%5B
 target%5D = pimpdb
@@ -900,32 +900,41 @@
 arget%5D = pimpdb%5B
+channel%5D%5B
 target%5D - 1%0A    
@@ -969,26 +969,172 @@
     
-pimpdb%5Btarget%5D = -
+try:%0A                    pimpdb%5Bchannel%5D%5Btarget%5D = 1%0A                except:%0A                    pimpdb%5Bchannel%5D = %7B%7D%0A                    pimpdb%5Bchannel%5D%5Btarget%5D = 
 1%0A%0A 
@@ -1206,16 +1206,25 @@
  pimpdb%5B
+channel%5D%5B
 target%5D%0A

add per-channel dictionaries