!report

By cofvempire on Jul 11, 2011

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)

!report doesn't kick anymore test thank you will fix this asap to see the reports: /run report.ini or if you want to search what a certain nick has reported: /report edit: added the n switch to treat the text just as plain text tnx to dani_ll11 ```mirc on *:text:!report *:#: { if ( $2- != $null ) { writeini -n report.ini $nick reports $2- say $nick thank you will fix this asap. notice $me $nick reported => $2- => to see this report on a later date check ur report => /report } } alias report { var %nick $$?="searching report from who?" echo -a ---> $readini(report.ini, n, %nick, reports) <--- } ```

Comments

Sign in to comment.
cofvempire   -  Jul 12, 2011

yes indeed :) tnx :)

 Respond  
Bielie   -  Jul 12, 2011

Dont worrie about deleting it ;) This is learn material ;)

 Respond  
cofvempire   -  Jul 12, 2011

tnx bielie i noticed that u have posted the same script (but better) so gonna remove this one

 Respond  
Bielie   -  Jul 12, 2011

ooh lol while changing it to 51 i did it wrong xD

$51 - $1

 Respond  
Dani_l11   -  Jul 12, 2011

if ($5 != $null) { notice $nick You cant use more then 50 words for your report! | halt }

Should be $50 I assume?

 Respond  
Bielie   -  Jul 12, 2011

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!
}
 Respond  
Dani_l11   -  Jul 12, 2011

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.

 Respond  
cofvempire   -  Jul 12, 2011

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.

 Respond  
Dani_l11   -  Jul 11, 2011

Try !Support $me and then /support yournick. You will see the $me evaled. I can write a maliciouse code if I wanted to harm you, but I'm saving you by not doing it, so you don't get backdoored.

 Respond  
cofvempire   -  Jul 11, 2011

its my second snippet thats using ini files, so i don't now everything about ini's
and the alias report is if someone has a noticewindow they can see who reported something and look it up that way.
and tested the command u said ($findfile...) didn't see anything happening...

 Respond  
Dani_l11   -  Jul 11, 2011

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.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.