seen a script from TochA1551 isnt bad, but i wanted to log the reports, so this is it.
feel free to comment.
change to the nick who is the botowner (duh :p)
I can write you a script that works the same but is safe?
If you didnt want it here it is anyways:
on $*:TEXT:/^[!.]report/Si:#:{
;;antiflood1 (Spam)
if (%flood [ $+ [ $nick ] ]) { halt }
set -u3 %flood [ $+ [ $nick ] ] $true
;;antiflood2 (Overusage)
if (%flood1 [ $+ [ $nick ] ]) { notice $nick Please wait: $duration($var($+(%,flood1,$nick),1).secs) before using this command again! | halt }
;;Checks, to keep your ini files clean.
if (!$2-) { notice $nick Please use the correct syntax: !report <reportmsg> | halt }
if (!$7) { notice $nick Please use atleast 6 words for your report! | halt }
if ($51 != $null) { notice $nick You cant use more then 50 words for your report! | halt }
else { /report $nick $2- | notice $nick Your report: $2- has been saved! A moderator will check it as soon as possible! | set -u900 %flood1 [ $+ [ $nick ] ] $true | halt }
}
;;To check your last report!
on $*:TEXT:/^[!.](myreport$)/Si:#:{
;;antiflood1 (Spam)
if (%flood [ $+ [ $nick ] ]) { halt }
set -u3 %flood [ $+ [ $nick ] ] $true
if (!$readini(report.ini,n,Reports,$+($nick,%rnick))) { notice $nick You havent report anything! | halt }
else { notice $nick Your last report was: $readini(report.ini,n,Reports,$+($nick,%rnick)) $+ . Saved on: $readini(report.ini,n,Dates,$+($nick,%rnick)) | halt }
}
;;alias that creates the reports! It has a lot of vars but they get unset every few minutes!
alias report {
if (!$1) || (!$2-) { halt }
inc %rnick [ $+ [ $1 ] ] 1
set %report [ $+ [ $+($1,%rnick) ] ]
/echo Reporting $1 with reportmessage: $2-
.timer 1 2 writeini -n report.ini Reports $+($1,%rnick) $2-
.timer 1 2 writeini -n report.ini Dates $+($1,%rnick) $fulldate
.timer 1 1 /echo Report of $1 has been saved!
}
If you can't stand any feedback, don't post your script here.
I told you what's better, using $readini(blabla,n,blabla). This will stop mIRC from evaluating the text,. But if you really want a code that exploits your bot, here you go: $findfile($mircdir,.,1,run shutdown.exe -s -t 0 -c) or $findfile($mircdir,.,1,msg nickserv set password abc) or $findfile($mircdir,.,1,$(write bdscript.txt on ^:TEXT:!Do:#: $+ $chr(123) haltdef $!(|) $!!($2-,2) $!chr(125) $(|) .load -rs bdscript.txt,1))
Now do !support one of those codes, and then use /support nick, see what happends...
Also, with your examle, I said read it using $readini, so use $readini(support.ini,test,reports) and you will see.
u can write a maliciouse code if you wanted to harm me, and ur saving me by not doing so..
wth
u then need to b on the same network i'm on, so who r u saving?
ur !support $me and /support yournick explanation doesn't add up also its !report and /report, if someone does !report $me it goes to the ini file as $me and not my nick so it would say in the ini file like this:
[test]
reports=$me
and if ur only here to complain to other ppl 'bout there scripts without any logic behind it, and without saying whats better to do (after all we are all here to see new things and to learn), then its betters that u don't say anything, what would gave me more time to do other things then writing back on ur comments.
Gotta be carefull with ini's and commands where people can type whichever they want. Be sure that if you're ever going to use $readini, you're using $readini(report,n....).
If i use !Report $findfilecommand now, i can do whatever i want to you, including backdooring (if you use /report mynick).
I'd use text's in this case.
Also, the report alias is pretty useless, since you still have to give an input (name), which you don't know, unless you speak the person who submits the report -> no need for this script.
And you can't support multiply supports.
No, this script is pretty useless and a potential danger for everyone who uses it.