check "Always strip color (automatically done on mode +c channels)", 60, 8 64 180 10, tab 165
edit The _/\tma FileServer includes the following variables for formatstring parsing: $crlf &Atma.Triggers &Atma.Users &Atma.Sends &Atma.Queues &Atma.InfoLine, 62, 6 78 272 26, tab 165 read multi
link "Click here for help on the formatstring parser", 55, 87 106 106 8, tab 165
button "Save", 63, 152 43 25 9, tab 165
button "Delete", 64, 178 43 25 9, tab 165
button "Preview", 65, 204 43 25 9, tab 165
combo 59, 50 43 90 52, tab 165 size drop
box FormatString, 56, 5 36 273 39, tab 165
icon 106, 9 23 264 8
text "Programmed by Correl J. Roush, 2002", 6, 3 139 93 8, disable
link "http://www.phoenixinquis.net/", 27, 201 139 77 8
button "okcancel", 66, 101 140 38 8, hide ok cancel
check "Start file server on connect", 25, 22 121 79 10
if (($1 == !list) && ($Atma.Channels($Atma.Networks($networkname),$chan).RespondToList) && ($Atma.Triggers($chan))) {
var %ad = $replace($parse_formatstr($chan,$Atma(FormatString)),&\,$chr(13))
var %counter = 1
while (%counter <= $numtok(%ad,13)) {
.notice $nick $gettok(%ad,%counter,13)
inc %counter
}
return
}
if ($istok($Atma.Triggers,$1-,5) && !$istok($Atma.Triggers($chan),$1-,5)) { .notice $nick The trigger ' $+ $1- $+ ' is not being served to $chan $+ . | return }
if ((!$istok($Atma.Triggers($chan),$1-,5)) || ($Atma.Channels($Atma.Networks($networkname),$chan).TriggerType != Normal)) { return }
if (!$Atma(Active)) { .notice $nick The FileServer is not available at this time. Please try again later. | return }
if ($fserv(0) >= $Atma(maxUsers)) { .notice $nick The FileServer is currently full. Please try again later. | return }
$iif($1- == VERSION50, ctcpreply $nick VERSION $Atma )
$iif(!$istok($Atma.Triggers,$1-,5),return)
if (!$Atma(Active)) { .notice $nick The FileServer is not available at this time. Please try again later. | return }
;Gotta figure out what chan the user may have triggered from, since ctcp isn't chan specific
;Of course, if a chan can't be found, then user must not have triggered from any channel, so foo on them
var %trigchan
var %counter = 1
while (%counter <= $numtok($Atma.Channels($Atma.Networks($networkname)),5)) {
var %chan = $gettok($Atma.Channels($Atma.Networks($networkname)),%counter,5)
if (%chan == *) {
var %counter2 = 1
while (%counter2 <= $numtok($Atma.Channels($Atma.Networks($networkname),*),44)) {
var %chan = $gettok($Atma.Channels($Atma.Networks($networkname),*),%counter,44)
if (($Atma.Channels($Atma.Networks($networkname),%chan).TriggerType == CTCP) && ($nick ison %chan) && ($istok($Atma.Triggers(%chan),$1-,5))) set %trigchan %chan
inc %counter2
}
}
else {
if (($Atma.Channels($Atma.Networks($networkname),%chan).TriggerType == CTCP) && ($nick ison %chan) && ($istok($Atma.Triggers(%chan),$1-,5))) set %trigchan %chan
msg =$nick - You may have up to $Atma(maxUSends) simultaneous file sends, and up to $Atma.Channels($Atma.Networks($networkname),%chan).maxUQueues $iif($Atma.Channels($Atma.Networks($networkname),%chan).QueueUsing == FileSize,MB worth of) queued files.
msg =$nick - The FServ is limited to a maximum of $Atma(maxTSends) simultaneous file sends and $Atma.Channels($Atma.Networks($networkname),%chan).maxTQueues $iif($Atma.Channels($Atma.Networks($networkname),%chan).QueueUsing == FileSize,MB worth of) queued files.
msg =$nick -
$iif($Atma(FServChat),msg =$nick - ***FServ Chat is enabled; you may chat with other users on the fserv)
$iif($Atma(ChannelEnforcer),msg =$nick - ***Channel Enforcer is enabled; parting the fserv's channels will result in your queues being cleared.)
$iif($Atma(MaxCPS.Enabled),msg =$nick - ***MaxCPS is enabled; sends from this server will not exceed $Atma(MaxCPS) kb/s.)
$iif($Atma(MinCPS.Enabled),msg =$nick - ***MinCPS is enabled; sends from this server may not drop below $Atma(MinCPS) CPS for more than $Atma(MinCPS.secs) seconds, or they will be terminated.)
$iif($Atma(DCCAllowEnforcer) == ban,msg =$nick - ***DCCAllowEnforcer is enabled; failure to /dccallow + $+ $me $+ will result in your sends/queues being cleared and a $duration($Atma(DCCAllowEnforcer.TempBan)) temporary ban from the fserv.)
notice $newnick Your fserv connection was closed due to a change in nickname. Please reconnect to ensure that files are queued under your new nickname.
}
}
on *:serv:*:{
$iif($1- == cd.., tokenize 32 cd ..)
$iif($istok(cd dir ls read exit bye c s,$1,32),return)
if ($1 == help) {
msg =$nick - Help - $Atma
if (!$2) {
msg =$nick - The following commands are supported:
if (($comchan($nick,0) <= 1) && $Atma(ChannelEnforcer) && $Atma.Queue($nick).Count) {
.notice $nick [FSERV NOTICE] You no longer share a common channel with the fserv; All waiting queues have been cleared [ $+ $Atma Channel Enforcer]
Atma.ClearQueues $nick
}
}
on *:snotice:*The user * is not accepting DCC sends of filetype*:{
var %filename = $send($3,$send($3,0)).file
close -s $send($3,0) $3
$iif($fserv($3),msg = $+ $3,.notice $3) Your send of %filename was BLOCKED by the IRC server. In order to recieve files of this type, you must first type /dccallow + $+ $me $+ , then you will be able to download the file.
if ($Atma(DCCAllowEnforcer) == Ban) {
close -sf $3
Atma.ClearQueues $3
Atma.Access.Add $address($3,9) Global Deny $calc($ctime + $Atma(DCCAllowEnforcer.TempBan)) DCCAllow Enforcement TempBan
.notice $3 Because you did not comply with this fserv's DCCALLOW rule, your sends and queues have been cleared, and you have been globally banned from this fserv for a duration of $duration($Atma(DCCAllowEnforcer.TempBan))
}
}
raw 401:*:{
; Ahnold may be back, but his queues won't be waiting for him ;d
close -s $2
Atma.ClearQueues $2
}
; __________________________
;/``````````````````````````
; Aliases
alias Atma.ver { return $readini($script,addon,version) }
.notice $send($1) Your send of $send($1).file has been canceled because the bytes per second dropped below the server minimum of $Atma(MinCPS) for a duration of $Atma(MinCPS.Secs) seconds.
if ((%matchhost iswm $1) && ($gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),1,32) == DENY)) {
return DENIED You are banned from using this trigger. Reason:( $gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),3-,32) ) (Ban Expires: $iif($gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),2,32),$asctime($ifmatch) / Current time = $asctime($ctime),Never) )
}
if ($gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),1,32) == ALLOW) {
if ((%matchhost iswm $1) && ($gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),1,32) == DENY)) {
return DENIED You are banned from using this FileServer. Reason:( $gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),3-,32) ) (Ban Expires: $iif($gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),2,32),$asctime($ifmatch) / Current time = $asctime($ctime),Never) )
}
if ($gettok($Atma.Config($hfind(_/\tmaFS,%regex,%counter,r)),1,32) == ALLOW) {