Id: 2515; Nick: Jqson; Timestamp: 2007-12-09 14:42:54; Pasted as: mIRC
Description: n/a
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
on $*:text:/^\*/:#:{ 
  var %cmd = $mid($1,2)
  If %cmd == help {
    timer 1 0 notice $nick Help list
    timer 1 1 notice $nick topic cmd: *topic <text> (This will change the topic and save it)
    timer 1 2 notice $nick refresh cmd: *refresh (This will load the topic)
    timer 1 3 notice $nick remove cmd: *remove (This will remove the saved topic)
    timer 1 4 notice $nick setlevel cmd: *setlevel <nick> <level> (This will add a new user)
    timer 1 5 notice $nick level cmd: *levels (This will list the bot levels)
  }
  elseif %cmd == levels {
    timer 1 0 notice $nick Aviable levels
    timer 1 1 notice $nick 0 = 
    timer 1 2 notice $nick 1 =   
    timer 1 3 notice $nick 2 =
    timer 1 4 notice $nick 3 =    
    timer 1 5 notice $nick 4 = 
    timer 1 6 notice $nick 5 = 
  }
  elseif %cmd == topic {
    if ($readini(bot.ini, userlist, $address($nick, 1)) == 5) || ($readini(bot.ini, $chan , $address($nick, 1)) >= 4) {
      remove topic $+ $chan $+ .txt
      write topic $+ $chan $+ .txt $2-
      timer 1 0 notice $nick Topic for $chan has been saved.
      timer 1 1 notice $nick Use *refresh to reset the topic.
      timer 1 2 topic $chan $2-
    } 
    else {
      notice $nick Access denied.
    }
  }
  elseif %cmd == refresh { 
    if ($readini(bot.ini, userlist, $address($nick, 1)) != 5) || (!$readini(bot.ini, $chan , $address($nick, 1)) >= 4) {
      notice $nick Access denied.
    }
    else { 
      If ($read(topic $+ $chan $+ .txt $+ ) != $null) { 
        topic $chan Refreshing..
        timer 1 5 topic $chan $read(topic $+ $chan $+ .txt $+ )
      }
      else {
        notice $nick Topic has been removed by $nick $+ .
      } 
    }
  }
  elseif %cmd == remove {
    if ($readini(bot.ini, userlist, $address($nick, 1)) == 5) || ($readini(bot.ini, $chan , $address($nick, 1)) >= 4) {
      remove topic $+ $chan $+ .txt
      notice $nick database: removed $chan $+ 's topic
      topic $chan Topic removed by $nick on $date at $time
    } 
    else {
      notice $nick Access denied.
    }
  }
  elseif %cmd == setlevel {
    if ($readini(bot.ini, userlist, $address($nick, 1)) == 5) || ($readini(bot.ini, $chan , $address($nick, 1)) >= 4) {
      If ($3 < $readini(bot.ini, $chan , $address($nick, 1)) {       
        If (!$readini(bot.ini, $chan $+ , $address($nick,1))) { 
          notice $nick Added $2 to userlist with level: $3
          writeini bot.ini $chan $address($2,1) $3
        }
        else {
          notice $nick The user already exists. ( $+ $address($nick,1) $+ )
        }
      }
      else {
        notice $nick info: Level required (eg: *setlevel <nick> <lvl>)
      }
    }
    else {
      notice $nick info: $2 was not found on $chan
    }
  }
  else {
    notice $nick Access denied.
  }
}
 
Options: New, Download,
, mIRC Parser;
Copyright © 2006 by Zyberdog - Some rights reserved. (Browse/Disclaimer/Stats/About)
Nothing to see here.