Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if { $cmd == "DBUNNUKE" } {
- set release [lindex $arg 1]
- set section [lindex $arg 2]
- set reason [lindex $arg 3]
- set curtime [lindex $arg 4]
- set nick [lindex $arg 5]
- set chan [lindex $arg 6]
- set network [lindex $arg 7]
- set source [lindex $arg 8]
- if { $source == "" } { set source $network }
- if { [llength $mysql(nuke,allowedsource)] <= 0 } { set AddToDB "1"
- } elseif { [lsearch -exact $mysql(nuke,allowedsource) $source] != -1 } { set AddToDB "1"
- } else { set AddToDB "0" }
- set numrel [::mysql::sel $mysql(handle) "SELECT rel_id FROM allpres WHERE rel_name = '$release'"]
- if { $numrel != 0 && $AddToDB == "1" } {
- set getsql [::mysql::sel $mysql(handle) "SELECT rel_id,nuked FROM allpres WHERE rel_name = '$release'" -flatlist]
- set rel_id [lindex $getsql 0]
- set nuked [lindex $getsql 1]
- foreach nuke {1 3 5 7 9} {
- if {$nuke == $nuked} {
- set nuked [expr $nuked + 1]
- set updatepre [::mysql::exec $mysql(handle) "UPDATE allpres SET nuked = '$nuked' WHERE rel_id = '$rel_id'"]
- set updatenuke [::mysql::exec $mysql(handle) "UPDATE nukes SET unnuked = 'Y' WHERE rel_id = '$rel_id'"]
- set insertnuke [::mysql::exec $mysql(handle) "INSERT INTO unnukes (rel_id,un_reason,un_time) VALUES ( '$rel_id' , '$reason' , '$curtime' )"]
- set insertnick [::mysql::exec $mysql(handle) "INSERT INTO nicks (rel_id,a_type,a_nick,a_chan,a_network) VALUES ( '$rel_id' , 'NUKE' , '$nick' , '$chan' , '$network' )"]
- putallbots "DBUNNUKEOK $release $section $reason $curtime $nick $chan $network $source"
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment