Id: 9734; Nick: ThLoser; Timestamp: 2008-04-25 18:45:35; 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
;--------------------------------------;
;               Commandlist            ;
; Here is all the commands for the bot ;
;--------------------------------------;
 
 
 
;-----------------------------------;
;               Userlist            ; 
;   Show the userlist Global/$chan  ; 
;-----------------------------------;
on *:TEXT:!userlist*:#:{
  if ($glvl($nick) >= 9) || ($ulvl($nick) >= 6) { 
    if ($2 == $null) { 
      if ($ini(database/chanlev.ini,$chan,0) == $null) || ($ini(database/chanlev.ini,$chan,0) == 0) {
        putnotice $nick Finns inga tillagda användare. 
        halt
      }
      else {
        var %x = 1
        while (%x <= $ini(database/chanlev.ini,$chan,0)) { 
          var %f = $ini(database/chanlev.ini,$chan,%x)
          putnotice $nick %x $+ . %f - $readini(database/chanlev.ini,$chan,%f)
          inc %x
        }
      }
    }
    if ($2 == -global) { 
      if ($ini(database/chanlev.ini,Global,0) == $null) || ($ini(database/chanlev.ini,Global,0) == 0) {
        putnotice $nick Finns inga tillagda användare. 
        halt
      }
      else {
        var %x = 1
        while (%x <= $ini(database/chanlev.ini,Global,0)) { 
          var %f = $ini(database/chanlev.ini,Global,%x)
          putnotice $nick %x $+ . $ini(database/chanlev.ini,Global,%x) ( $+ $iif($ialchan(%f,#,0) == 0,N/A,$ialchan(%f,#,1).nick) $+ ) - $checklvl($readini(database/chanlev.ini,Global,%f))
          inc %x
        }
      }
    }
  }
}
 
 
;----------------------------------------------------------------;
;                      Adduser Function                          ; 
;  Command $chan: !adduser nick <owner|master|op|voice>          ;
;  Command Global: !adduser -global nick <owner|master|op|voice> ; 
;----------------------------------------------------------------;
on *:TEXT:!adduser*:#:{ 
  if ($ulvl($nick) == 7) {
    if ($2 == $null) || ($2 !ison $chan) || (!$3) || (!$istok(owner master op voice,$3,32)) { putnotice $nick !adduser nick <owner|master|op|voice> | halt }
    elseif ($2 != $null) && ($2 ison $chan) && ($istok(owner master op voice,$3,32)) {
      writeini database/chanlev.ini $chan $address($2,1) $formatlvl($chan,$3) 
      putnotice $nick Done, User: $2 Address: $address($2,1) was added to the database as $3 $+ ! 
      halt
    }            
  }
  if ($glvl($nick) >= 9) { 
    if ($2 == -global) { 
      if (!$3) || (!$4) || (!$istok(owner master op,$4,32)) { putnotice $nick !adduser -global nick <owner|master|op> | halt }
      elseif ($3 != $null) && ($3 ison $chan) && ($istok(owner master op,$4,32)) {  
        writeini database/chanlev.ini Global $address($3,1) $formatlvl(Global,$4) 
        putnotice $nick Done, User: $3 Address: $address($3,1) was added to the globallist as $4 $+ !
      }
    } 
    else { halt }
  }
}
 
 
;--------------------------------------------------;
;               Op/Deop/Voice/Devoice              ;     
;  Command: !<op|deop|voice|devoice> <nick|$null>  ;
;--------------------------------------------------;
on *:TEXT:!op*:#:{ 
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) { 
    mode $chan +o $iif($2,$2,$nick) 
  }
}
on *:TEXT:!deop*:#:{ 
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) { 
    mode $chan -o $iif($2,$2,$nick) 
  }
}
on *:TEXT:!voice*:#:{ 
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) { 
    mode $chan +v $iif($2,$2,$nick) 
  }
}
on *:TEXT:!devoice*:#:{ 
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) { 
    mode $chan -v $iif($2,$2,$nick) 
  }
}
 
 
;-----------------------------------------------;
;                   Kick/Ban Function           ;
;    Command: !<kick|ban> <nick> <reason|$null> ; 
;-----------------------------------------------;
on *:TEXT:!kick*:#:{
  if ($2 == $null) { putnotice $nick !kick <nick> <reason> | halt } 
  elseif ($2 != $null) {  
    kick $chan $2 $iif($3,$3,Kicked: No Reason!) 
  }
}
on *:TEXT:!ban*:#:{
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) {
    if ($2 == list) {  
      var %x = 1 
      while (%x => $ibl($chan,0)) { 
        putnotice $nick %x $+ . $ibl($chan,%x) 
        inc %x
      }
      halt
    }
    if ($2 !ison $chan) && ($2 != list) { return }
    if ($3 isnum 1-) { var %d = $3 * 60 }
    elseif ($3 isnum) { notice $nick Invalid duration. | halt }
    if (!$3) || (%d && !$4) { var %noreason = 1 }
    elseif (!%d) && ($2 != list) var %r = 1
    ban -ku $+ %d $chan $2 Banned $+ $iif(!%noreason,$iif(%r,: $3-,: $4-))
    putnotice $nick $2 was banned for $iif($3 isnum,$3,60) Minutes.
  }
}
 
 
;-----------------------------;
;        Unban Function       ;
;  Command: !unban<all|$host> ;
;-----------------------------;
on *:TEXT:!unban*:#:{ 
  if ($glvl($nick) >= 9) || ($ulvl($nick) >= 6) { 
    if ($2 == $null) { putnotice $nick !unban <host|all> | halt }
    if ($2 == all) { 
      mode $chan b-b * * 
      halt
    } 
    elseif ($2 != all) && ($chr(35) !isin $2) { 
      mode $chan -b $2- 
      halt
    }
    elseif ($2 != all) && ($chr(35) isin $2) {
      mode $chan -b $ibl($chan,$mid($2,2))
      halt
    }
  }
}
 
Parsed for bracket errors and indented:
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
;--------------------------------------;
;               Commandlist            ;
; Here is all the commands for the bot ;
;--------------------------------------;
 
 
 
;-----------------------------------;
;               Userlist            ;
;   Show the userlist Global/$chan  ;
;-----------------------------------;
on *:TEXT:!userlist*:#:{
  if ($glvl($nick) >= 9) || ($ulvl($nick) >= 6) {
    if ($2 == $null) {
      if ($ini(database/chanlev.ini,$chan,0) == $null) || ($ini(database/chanlev.ini,$chan,0) == 0) {
        putnotice $nick Finns inga tillagda användare.
        halt
      }
      else {
        var %x = 1
        while (%x <= $ini(database/chanlev.ini,$chan,0)) {
          var %f = $ini(database/chanlev.ini,$chan,%x)
          putnotice $nick %x $+ . %f - $readini(database/chanlev.ini,$chan,%f)
          inc %x
        }
      }
    }
    if ($2 == -global) {
      if ($ini(database/chanlev.ini,Global,0) == $null) || ($ini(database/chanlev.ini,Global,0) == 0) {
        putnotice $nick Finns inga tillagda användare.
        halt
      }
      else {
        var %x = 1
        while (%x <= $ini(database/chanlev.ini,Global,0)) {
          var %f = $ini(database/chanlev.ini,Global,%x)
          putnotice $nick %x $+ . $ini(database/chanlev.ini,Global,%x) ( $+ $iif($ialchan(%f,#,0) == 0,N/A,$ialchan(%f,#,1).nick) $+ ) - $checklvl($readini(database/chanlev.ini,Global,%f))
          inc %x
        }
      }
    }
  }
}
 
 
;----------------------------------------------------------------;
;                      Adduser Function                          ;
;  Command $chan: !adduser nick <owner|master|op|voice>          ;
;  Command Global: !adduser -global nick <owner|master|op|voice> ;
;----------------------------------------------------------------;
on *:TEXT:!adduser*:#:{
  if ($ulvl($nick) == 7) {
    if ($2 == $null) || ($2 !ison $chan) || (!$3) || (!$istok(owner master op voice,$3,32)) { putnotice $nick !adduser nick <owner|master|op|voice> | halt }
    elseif ($2 != $null) && ($2 ison $chan) && ($istok(owner master op voice,$3,32)) {
      writeini database/chanlev.ini $chan $address($2,1) $formatlvl($chan,$3)
      putnotice $nick Done, User: $2 Address: $address($2,1) was added to the database as $3 $+ !
      halt
    }
  }
  if ($glvl($nick) >= 9) {
    if ($2 == -global) {
      if (!$3) || (!$4) || (!$istok(owner master op,$4,32)) { putnotice $nick !adduser -global nick <owner|master|op> | halt }
      elseif ($3 != $null) && ($3 ison $chan) && ($istok(owner master op,$4,32)) {
        writeini database/chanlev.ini Global $address($3,1) $formatlvl(Global,$4)
        putnotice $nick Done, User: $3 Address: $address($3,1) was added to the globallist as $4 $+ !
      }
    }
    else { halt }
  }
}
 
 
;--------------------------------------------------;
;               Op/Deop/Voice/Devoice              ;
;  Command: !<op|deop|voice|devoice> <nick|$null>  ;
;--------------------------------------------------;
on *:TEXT:!op*:#:{
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) {
    mode $chan +o $iif($2,$2,$nick)
  }
}
on *:TEXT:!deop*:#:{
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) {
    mode $chan -o $iif($2,$2,$nick)
  }
}
on *:TEXT:!voice*:#:{
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) {
    mode $chan +v $iif($2,$2,$nick)
  }
}
on *:TEXT:!devoice*:#:{
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) {
    mode $chan -v $iif($2,$2,$nick)
  }
}
 
 
;-----------------------------------------------;
;                   Kick/Ban Function           ;
;    Command: !<kick|ban> <nick> <reason|$null> ;
;-----------------------------------------------;
on *:TEXT:!kick*:#:{
  if ($2 == $null) { putnotice $nick !kick <nick> <reason> | halt }
  elseif ($2 != $null) {
    kick $chan $2 $iif($3,$3,Kicked: No Reason!)
  }
}
on *:TEXT:!ban*:#:{
  if ($ulvl($nick) >= 6) || ($glvl($nick) >= 9) {
    if ($2 == list) {
      var %x = 1
      while (%x => $ibl($chan,0)) {
        putnotice $nick %x $+ . $ibl($chan,%x)
        inc %x
      }
      halt
    }
    if ($2 !ison $chan) && ($2 != list) { return }
    if ($3 isnum 1-) { var %d = $3 * 60 }
    elseif ($3 isnum) { notice $nick Invalid duration. | halt }
    if (!$3) || (%d && !$4) { var %noreason = 1 }
    elseif (!%d) && ($2 != list) var %r = 1
    ban -ku $+ %d $chan $2 Banned $+ $iif(!%noreason,$iif(%r,: $3-,: $4-))
    putnotice $nick $2 was banned for $iif($3 isnum,$3,60) Minutes.
  }
}
 
 
;-----------------------------;
;        Unban Function       ;
;  Command: !unban<all|$host> ;
;-----------------------------;
on *:TEXT:!unban*:#:{
  if ($glvl($nick) >= 9) || ($ulvl($nick) >= 6) {
    if ($2 == $null) { putnotice $nick !unban <host|all> | halt }
    if ($2 == all) {
      mode $chan b-b * *
      halt
    }
    elseif ($2 != all) && ($chr(35) !isin $2) {
      mode $chan -b $2-
      halt
    }
    elseif ($2 != all) && ($chr(35) isin $2) {
      mode $chan -b $ibl($chan,$mid($2,2))
      halt
    }
  }
}
 
Options: New, Download,
, mIRC Parser;
Copyright © 2006 by Zyberdog - Some rights reserved. (Browse/Disclaimer/Stats/About)