begin process at 2010 03 21 12:33:59
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Scripts

 > REMOTES DE MON BOT [AUTH/OP/KICK/WELCOME/TEXTE]

REMOTES DE MON BOT [AUTH/OP/KICK/WELCOME/TEXTE]


 Information sur la source

Note :
Aucune note
Catégorie :Scripts Classé sous :newseur, record, auth, anti-ban, voiceur-oppeur Niveau :Débutant Date de création :04/04/2009 Date de mise à jour :14/04/2009 14:43:58 Vu :1 592

Auteur : indaweed

Ecrire un message privé
Site perso
Commentaire sur cette source (30)
Ajouter un commentaire et/ou une note

 Description

Voici quelques remotes de mon bot. Il dit bonjour en arrivant sur le chan, donne une liste de commandes !cmd. Permet de rajouter des news ou pub dans un txt et de lancer un timer séparer pour les afficher sur le chan

N'oubliez pas de changer les "tonchan" par votre channel
Pour l'auth il suffit de recrer un user dans votre userlist avec le level 400 pour pouvoir en rajouter manuellement avec les commandes !addop !addvoice !addmaster

example:
400:Votrenick!*ident@users .quakenet.org(/guser 400 Votrenick!*ident@users.quakenet.org)

Source

  • ON *:CONNECT:{
  • if (%my-chan == $null) { /set %my-chan #$$?="Enter the name of channel where the bot must work" }
  • if (%my-web == $null) { /set %my-web $$?="Enter the url of your website" }
  • if (%password == $null) { /set %password $$?="Enter the password to auth" }
  • if (%affluence.courant == $null) { /set %affluence.courant 0 }
  • if (%record.affluence == $null) { /set %record.affluence 0 }
  • if (%record.affluence.date == $null) { /set %record.affluence.date April 01 }
  • if (%record.affluence.nick == $null) { /set %record.affluence.nick default }
  • if (%record.affluence.time == $null) { /set %record.affluence.time 00:00 }
  • if (%record.kick == $null) { /set %record.kick 0 }
  • if (%record.ban == $null) { /set %record.ban 0 }
  • if (%record.unban == $null) { /set %record.unban 0 }
  • if (%record.op == $null) { /set %record.op 0 }
  • if (%record.deop == $null) { /set %record.deop 0 }
  • if (record.op == $null) { /set %record.op 0 }
  • if (record.voice == $null) { /set record.voice 0 }
  • if (%record.devoice == $null) { /set %record.devoice 0 }
  • if (%db.news == $null) { /set db.news 0 }
  • if (%db.pub == $null) { /set db.pub 0 }
  • }
  • ON *:JOIN:%my-chan:{
  • if ($ulevel >= 1) {
  • /notice $nick [#Origine-Online] 0,1 .::7,1 [BoT]0,1 Type !Cmd for the list of commands ::.
  • /set %affluence.courant $nick($chan, 0)
  • if (%affluence.courant > %record.affluence) {
  • /set %record.affluence.nick $nick
  • /set %record.affluence %afflu.courant
  • /set %record.affluence.date $date(mmmm dd)
  • /set %record.affluence.time $asctime(HH:nn)
  • /msg $chan 0,1 .::7,1[ANNOUNCEMENT] 0,1: %ori-chan broke a new record attendance with %record.affluence connected ::.
  • /msg $chan 0,1 .::7,1[ANNOUNCEMENT] 0,1: The record was established on %record.affluence.date at %record.affluence.time minutes, by %record.affluence.nick ::.
  • }
  • }
  • if ($ulevel = 100) {
  • if (users.quakenet.org isin $address) { halt }
  • elseif ($nick !isvoice %my-chan) {
  • /mode %my-chan +v $nick
  • /inc %record.voice 1
  • if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
  • /echo @MONITORING-YOU $nick has been automatically VOICE at $asctime(HH:nn:ss)
  • }
  • }
  • if ($ulevel >= 200) {
  • if (users.quakenet.org isin $address) { halt }
  • elseif ($nick !isop %my-chan) {
  • /mode %my-chan +o $nick
  • /inc %record.op 1
  • if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
  • /echo @MONITORING-YOU $nick has been automatically OP at $asctime(HH:nn:ss)
  • }
  • }
  • }
  • ON *:TEXT:*:?:{
  • if ($1 == !auth) && ($2 != %password ) {
  • /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 Wrong password ::.
  • /closemsg
  • /halt
  • }
  • elseif ($1 == !auth) && ($2 == %password ) {
  • /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 You've been auth with success $nick ::.
  • /guser 400 $nick 3
  • /closemsg
  • /halt
  • }
  • else {
  • /msg $nick 0,1 .::7,1 [BoT]0,1 Ohh yeeahhh I'm a bad guyz :) ::.
  • /closemsg
  • }
  • }
  • ON *:TEXT:*:%my-chan: {
  • if ($ulevel >= 1) {
  • if ($1 == !cmd) {
  • /notice $nick 7,1 The following commands are available to you !
  • /notice $nick 7,1 !CHUCK 0,1 ( show a random quote from www.chucknorrisisgod.com )
  • /notice $nick 7,1 !FORUM 0,1 ( show url of our forum )
  • /notice $nick 7,1 !NEWS 0,1 ( show a random news )
  • /notice $nick 7,1 !RANDOM ( Funny :) )
  • /notice $nick 7,1 !RECRUITMENT 0,1 ( show url for more information about recruitment )
  • /notice $nick 7,1 !RECORD 0,1 ( show some record )
  • /notice $nick 7,1 !SPONSORS 0,1 ( show url of our sponsors )
  • /notice $nick 7,1 !WEB 0,1 ( show url of our website )
  • }
  • if ($1 == !chuck) { if (%chuck == 0) { sockopen chuck chucknorrisisgod.com 80 | %chuck = 1 } }
  • if ($1 == !forum) { /msg $chan 0,1 .::7,1 [Forum]0,1 http://forum.origine-online.com/ ::. }
  • if ($1 == !news) { /msg $chan $iif(($2 isnum 1- $+ $lines(news.txt)),$read(news.txt,$2),$read(news.txt)) }
  • if ($1 == !random) { /set %random.nick $nick | /play -cr %my-chan funny.txt }
  • if ($1 == !recruitment) { /msg $chan 0,1 .::7,1 [Recruitment]0,1 www.origine-online.com/rejoindre ::. }
  • if ($1 == !record) { /msg $chan 0,1 .::7,1 [Record]0,1 The record of affluence is %record.affluence established the %record.affluence.date at %record.affluence.time minutes, by %record.affluence.nick ::. }
  • if ($1 == !sponsors) { /msg $chan 0,1 .::7,1 [Sponsors]0,1 www.PexCreativ.com - www.Webadev.com ::. }
  • if ($1 == !web) { /msg $chan 0,1 .::7,1 [Website]0,1 %my-web ::. }
  • }
  • if ($ulevel >= 100) {
  • if ($me isop %my-chan) {
  • if ($1 == !cmd) { /notice $nick 7,1 !VOICE 0,1 ( voice you on the channel ) }
  • if ($1 == !voice) { /inc %record.voice 1 | /mode %my-chan +v $nick }
  • }
  • }
  • if ($ulevel >= 200) {
  • if ($me isop %my-chan) {
  • if ($1 == !cmd) {
  • /notice $nick 7,1 !DEVOICE 0,1 ( Devoices you or other users on the channel )
  • /notice $nick 7,1 !OP 0,1 ( Ops you or other users on the channel )
  • /notice $nick 7,1 !DEOP 0,1 ( Deops you or other users on the channel )
  • /notice $nick 7,1 !KICK 0,1 ( Kick a user on the channel )
  • /notice $nick 7,1 !BAN 0,1 ( Ban a user for 10 min )
  • /notice $nick 7,1 !PERMBAN 0,1 ( Ban permanently a user )
  • /notice $nick 7,1 !UNBAN 0,1 ( Remove a user from the banlist )
  • }
  • if ($1 == !op) { /inc %record.op 1 | /mode %my-chan +ooooo $2- }
  • if ($1 == !deop) { /inc %record.deop 1 | /mode %my-chan -ooooo $2- }
  • if ($1 == !voice) { /inc %record.voice 1 | /mode %my-chan +vvvvv $2- }
  • if ($1 == !devoice) { inc %record.devoice 1 | /mode %my-chan -vvvvv $2- }
  • if ($1 == !kick) { /inc %record.kick 1 | /kick %my-chan $2 }
  • if ($1 == !ban) { /inc %record.ban 1 | /inc %record.kick 1 | /ban -u600 %my-chan $address($2-,4) | /kick %my-chan $2 0,1 .:: Banned 10 min ::. }
  • if ($1 == !permban) { /inc %record.ban 1 | /inc %record.kick 1 | /ban %my-chan $address($2-,4) | /kick %my-chan $2 0,1 .:: Banned permanently ::. }
  • if ($1 == !unban) { /inc %record.unban 1 | /ban -r %my-chan $nick }
  • }
  • if ($ulevel >= 300) {
  • if ($me isop %my-chan) {
  • if ($1 == !cmd) {
  • /notice $nick 7,1 !ADDNEWS 0,1 ( Adds a news to the list )
  • /notice $nick 7,1 !ADDPUB 0,1 ( Adds a advertising to the list )
  • /notice $nick 7,1 !DELNEWS 0,1 ( Removes a news from the list )
  • /notice $nick 7,1 !DELPUB 0,1 ( Removes a advertising from the list )
  • /notice $nick 7,1 !STARTNEWS 0,1
  • /notice $nick 7,1 !STOPNEWS 0,1
  • /notice $nick 7,1 !STARTPUB 0,1
  • /notice $nick 7,1 !STOPPUB 0,1
  • /notice $nick 7,1 !ADDVOICE 0,1
  • /notice $nick 7,1 !ADDOP 0,1
  • }
  • if ($1 == !addnews) {
  • if ($2 == $null) || ($3 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To add a news, type 7,1!ADDNEWS GAME 0,1followed by your message ::. | halt }
  • else {
  • /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 A news has been added ::.
  • /inc %db.news 1
  • /write news.txt 0,1 .:: 7,1[NEWS][ $2 ]0,1 $3- (  $+ posted on $date(mmmm dd) $+ , $date(yyyy) ) ::.
  • /write newslog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : Added by $nick : $3-
  • if (!$window(@MONITORING)) { window -k0nze @MONITORING }
  • /echo @MONITORING $nick have added a news at $asctime(HH:nn:ss)
  • }
  • }
  • if ($1 == !delnews) {
  • if ($2 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To delete a news, type 7,1!DELNEWS0,1 [ligne] ::. | halt }
  • else {
  • /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 A news has been deleted ::.
  • /dec %db.news 1
  • /write $+(-dl,$2.sel) news.txt
  • /write newslog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : News n° $2- deleted by $nick .
  • if (!$window(@MONITORING)) { window -k0nze @MONITORING }
  • /echo @MONITORING $nick have deleted a news at $asctime(HH:nn:ss)
  • }
  • }
  • if ($1 == !addpub) {
  • if ($2 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To add a advertising, type 7,1!ADDPUB0,1 followed by your message ::. | halt }
  • else {
  • /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 A advertising has been added ::.
  • /inc %db.pub 1
  • /write pub.txt 0,1 .:: 7,1[ADVERTISING]0,1 $2- (  $+ posted on $date(mmmm dd) $+ , $date(yyyy) ) ::.
  • /write publog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : Added by $nick : $2-
  • if (!$window(@MONITORING)) { window -k0nze @MONITORING }
  • /echo @MONITORING $nick have added a advertising at $asctime(HH:nn:ss)
  • }
  • }
  • if ($1 == !delpub) {
  • if ($2 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To delete a advertising, type 7,1!DELPUB0,1 [ligne] ::. | halt }
  • else {
  • /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 advertising has been deleted ::.
  • /dec %db.pub 1
  • /write $+(-dl,$2.sel) pub.txt
  • /write publog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : Advertising n° $2- deleted by $nick .
  • if (!$window(@MONITORING)) { window -k0nze @MONITORING }
  • /echo @MONITORING $nick have deleted a advertising at $asctime(HH:nn:ss)
  • }
  • }
  • if ($1 == !startnews) {
  • /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : News activated ::.
  • /timernews 0 2700 /play -r %my-chan news.txt
  • }
  • if ($1 == !stopnews) {
  • /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : News desactivated ::.
  • /timernews off
  • }
  • if ($1 == !startpub) {
  • /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : Advertising activated ::.
  • /timerpub 0 5400 /play -r %my-chan pub.txt
  • }
  • if ($1 == !stoppub) {
  • /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : Advertising desactivated ::.
  • /timerpub off
  • }
  • if ($1 == !addvoice) { /guser 100 $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been added to the voice list by $nick ::. }
  • if ($1 == !addop) { /guser 200 $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been added to the op list by $nick ::. }
  • }
  • }
  • if ($ulevel >= 400) {
  • if ($1 == !cmd) {
  • /notice $nick 7,1 !ADDMASTER 0,1
  • /notice $nick 7,1 !DELUSER 0,1
  • /notice $nick 7,1 !JOIN 0,1
  • /notice $nick 7,1 !PART 0,1
  • }
  • if ($1 == !find) {
  • :find
  • /var %noob = $nick(#,$r(1,$nick(#,0)))
  • if (%noob isop %my-chan) || (%noob isvoice %my-chan) { goto find }
  • elseif ($me isop %my-chan) {
  • /timerfind1 1 2 /msg %my-chan 0,1 .::7,1 [BoT]0,1 Looking for a noob to kick ::.
  • /timerfind2 1 4 /msg %my-chan 0,1 .::7,1 [BoT]0,1 I have found somebody ! ::.
  • /timerfind3 1 7 /msg %my-chan 0,1 .::7,1 [BoT]0,1 And the winner is %noob ::.
  • /timerfind4 1 9 /kick %my-chan %noob 0,1 .:: Random noob kicker has owned you ::.
  • }
  • }
  • if ($1 == !addmaster) { /guser 300 $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been added to the master list by $nick ::. }
  • if ($1 == !deluser) { /ruser $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been remove from the access list by $nick ::. }
  • if ($1 == !join) { /join $2- | /msg $2- 0,1 .::7,1[BoT]0,1 Helloooooo, I'm here to idle ::. }
  • if ($1 == !part) && ($2 != %my-chan) { /msg $2- 0,1 .::7,1[BoT]0,1 Goodbye and see you soon on %my-chan ::. | /part $2- }
  • }
  • }
  • }
  • ON *:SOCKOPEN:chuck: {
  • if ($sockerr > 0) {
  • /return
  • /sockclose chuck
  • %chuck = 0
  • /msg %my-chan 0,1 .::7,1[BoT]0,1 Service unavailable ::.
  • }
  • else {
  • /sockwrite -n chuck GET /rand.php HTTP/1.1
  • /sockwrite -n chuck Host: chucknorrisisgod.com $+ $str($crlf,2)
  • }
  • }
  • ON *:SOCKREAD:chuck: {
  • if ($sockerr) {
  • /msg %my-chan 0,1 .::7,1[BoT]0,1 Service unavailable ::.
  • /halt
  • }
  • /var %text
  • /sockread %text
  • if ($regex(%text,/<td valign='top' nowrap># (\d+)</td><td width='100%' colspan='2'>(.+)</td></tr><tr><td>/i)) {
  • /msg %my-chan 0,1.::7,1 [Chuck] $chr(35) $+ $regml(1) $+ 0,1 : $regml(2) ::.
  • /sockclose chuck
  • %chuck = 0
  • }
  • }
  • ---------------------------------------------------------------------------------
  • New File
  • ON *:TEXT:*#*:%my-chan:{
  • /set %frase $1-
  • if ( $me ison $wildtok(%frase,#*,1,32) ) { /halt }
  • else {
  • if ( $nick isop %my-chan ) || ($ulevel >= 200) {
  • /notice $nick 0,1.:: 7,1[BoT]0,1 You are maybe OP but this is not a reason to advertise ::.
  • /halt
  • }
  • else {
  • /set %frase $1-
  • if ( $chr(44) isin $wildtok(%frase,#*,1,32) || $wildtok(%frase,#*,1,32) == %my-chan || %my-chan isin $wildtok(%frase,#*,1,32) ) { /halt }
  • else {
  • /inc %adv. [ $+ [ $nick ] ]
  • if (%adv. [ $+ [ $nick ] ] == 1) {
  • /notice $nick 0,1.:: 7,1[BoT]0,1 Pay attention, you just make an advertising on $chan next time you will be banned for 5 min ::.
  • /timer1pub 1 1 /join $wildtok(%frase,#*,1,32)
  • /timer2pub 1 2 /msg $wildtok(%frase,#*,1,32) 0,1.:: 7,1[BoT]0,1 Advertising reply of $chan :: An advertising has been detected for $wildtok(%frase,#*,1,32) by $nick ::.
  • /timer3pub 1 4 /part $wildtok(%frase,#*,1,32)
  • /halt
  • }
  • if (%adv. [ $+ [ $nick ] ] == 2) {
  • /inc %record.kick 1 | /inc %record.ban 1
  • /kick %my-chan $nick 0,1.:: You was warned :: Kick/Ban 5 min ::.
  • /ban -u300 %my-chan $address($nick,4)
  • /unset %adv. [ $+ [ $nick ] ]
  • if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
  • /echo @MONITORING-YOU $nick has been KICK-BAN for advertising at $asctime(HH:nn:ss)
  • }
  • }
  • }
  • }
  • }
  • ON *:TEXT:*www.*:%my-chan:{
  • if ( $nick isop %my-chan ) || ($ulevel >= 200) {
  • /notice $nick 0,1.:: 7,1[BoT]0,1 You are maybe OP but this is not a reason to advertise ::.
  • /halt
  • }
  • else {
  • /inc %adv. [ $+ [ $nick ] ]
  • if (%adv. [ $+ [ $nick ] ] == 1) {
  • /notice $nick 0,1.:: 7,1[BoT]0,1 Pay attention, you just make an advertisement on $chan next time you will be banned for 5 min ::.
  • /halt
  • }
  • if (%adv. [ $+ [ $nick ] ] == 2) {
  • /inc %record.kick 1 | /inc %record.ban 1
  • /kick %my-chan $nick 0,1.:: You was warned :: Kick/Ban 5 min ::.
  • /ban -u300 %my-chan $address($nick,4)
  • /unset %adv. [ $+ [ $nick ] ]
  • if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
  • /echo @MONITORING-YOU $nick has been KICK-BAN for advertising at $asctime(HH:nn:ss)
  • }
  • }
  • }
  • ON *:TEXT:*http*:%my-chan:{
  • if ( $nick isop %my-chan ) || ($ulevel >= 200) {
  • /notice $nick 0,1.:: 7,1[BoT]0,1 You are maybe OP but this is not a reason to advertise ::.
  • /halt
  • }
  • else {
  • /inc %adv. [ $+ [ $nick ] ]
  • if (%adv. [ $+ [ $nick ] ] == 1) {
  • /notice $nick 0,1.:: 7,1[BoT]0,1 Pay attention, you just make an advertisement on $chan next time you will be banned for 5 min ::.
  • /halt
  • }
  • if (%adv. [ $+ [ $nick ] ] == 2) {
  • /inc %record.kick 1 | /inc %record.ban 1
  • /kick %my-chan $nick 0,1.:: You was warned :: Kick/Ban 5 min ::.
  • /ban -u300 %my-chan $address($nick,4)
  • /unset %adv. [ $+ [ $nick ] ]
  • if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
  • /echo @MONITORING-YOU $nick has been KICK-BAN for advertising at $asctime(HH:nn:ss)
  • }
  • }
  • }
  • ---------------------------------------------------------------------------------
  • New File
  • ON *:BAN:#:{
  • if (( $banmask iswm $address($me,5) ) && ( $me isop %my-chan )) {
  • /mode %my-chan -bo+b $banmask $nick $address($nick,4)
  • /kick %my-chan $nick 0,1.::7,1[BoT]0,1 Don't kick/ban me, Bitch ! ::.
  • /inc %record.kick 1 | /inc %record.ban 1
  • if (!$window(@MONITORING-ME)) { window -k0nze @MONITORING-ME }
  • /echo @MONITORING-ME Banned by $nick at $asctime(HH:nn:ss)
  • }
  • }
  • ON *:KICK:#:{
  • if (( $knick == $me ) && ( $me isop $chan )) {
  • /msg $iif( Q ison $chan,Q,L ) invite $chan
  • /timerban2 1 2 /mode %my-chan -o+b $nick $address($nick,4)
  • /timerkick2 1 2 /kick %my-chan $nick 0,1.::7,1[BoT]0,1 Don't kick/ban me, Bitch ! ::.
  • /inc %record.kick 1 | /inc %record.ban 1
  • /msg Q UNBANME %my-chan
  • if (!$window(@MONITORING-ME)) { window -k0nze @MONITORING-ME }
  • /echo @MONITORING-ME Kicked by $nick at $asctime(HH:nn:ss)
  • }
  • }
  • ON *:DEOP:#:{
  • if ( $opnick == $me ) {
  • /msg $iif( Q ison %my-chan,Q,L ) op %my-chan
  • /timerban 1 2 /mode %my-chan -o+b $nick $address($nick,4)
  • /timerkick 1 2 /kick %my-chan $nick 0,1.::7,1[BoT]0,1 Don't deop me, Bitch ! ::.
  • /inc %record.kick 1 | /inc %record.ban 1
  • if (!$window(@MONITORING-ME)) { window -k0nze @MONITORING-ME }
  • /echo @MONITORING-ME Deoped by $nick at $asctime(HH:nn:ss)
  • }
  • }
  • ON *:INVITE:#:{
  • if ( $nick == Q ) {
  • /join $chan
  • }
  • }
  • ON *:TEXT:*:%my-chan:{
  • if ($nick isop $chan) {
  • inc $+(%,flood,$ial($nick),$chan) 1
  • if ($eval($+(%,flood,$ial($nick),$chan),2) <= 3 ) {
  • /timer 1 2 /unset $+(%,flood,$ial($nick),$chan)
  • }
  • else {
  • /notice $nick (You flood too much):(you can't talk):(TimeMuet 30 Sec)
  • if ( $nick isvoice $chan ) {
  • /mode $chan -v $nick
  • /mode $chan +b $ial($nick).host
  • /timer 1 30 /mode $chan -b $ial($nick).host
  • /timer 1 30 /mode $chan +v $nick
  • /unset $+(%,flood,$ial($nick),$chan)
  • if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
  • /echo @MONITORING-YOU $nick has been MUTE for flooding at $asctime(HH:nn:ss)
  • }
  • else {
  • /mode $chan +b $ial($nick).host
  • /timer 1 30 /mode $chan -b $ial($nick).host
  • /unset $+(%,flood,$ial($nick),$chan)
  • }
  • }
  • }
  • }
ON *:CONNECT:{
  if (%my-chan == $null) { /set %my-chan #$$?="Enter the name of channel where the bot must work" }
  if (%my-web == $null) { /set %my-web $$?="Enter the url of your website" }
  if (%password == $null) { /set %password $$?="Enter the password to auth" }
  if (%affluence.courant == $null) { /set %affluence.courant 0 }
  if (%record.affluence == $null) { /set %record.affluence 0 }
  if (%record.affluence.date == $null) { /set %record.affluence.date April 01  }
  if (%record.affluence.nick == $null) { /set %record.affluence.nick default }
  if (%record.affluence.time == $null) { /set %record.affluence.time 00:00 }
  if (%record.kick == $null) { /set %record.kick 0 }
  if (%record.ban == $null) { /set %record.ban 0 }
  if (%record.unban == $null) { /set %record.unban 0 }
  if (%record.op == $null) { /set %record.op 0 }
  if (%record.deop == $null) { /set %record.deop 0 }
  if (record.op == $null) { /set %record.op 0 }
  if (record.voice == $null) { /set record.voice 0 }
  if (%record.devoice == $null) { /set %record.devoice 0 }
  if (%db.news == $null) { /set db.news 0 }
  if (%db.pub == $null) { /set db.pub 0 }
}
ON *:JOIN:%my-chan:{
  if ($ulevel >= 1) {
    /notice $nick [#Origine-Online] 0,1 .::7,1 [BoT]0,1 Type !Cmd for the list of commands ::.
    /set %affluence.courant $nick($chan, 0)
    if (%affluence.courant > %record.affluence) {
      /set %record.affluence.nick $nick
      /set %record.affluence %afflu.courant
      /set %record.affluence.date $date(mmmm dd)
      /set %record.affluence.time $asctime(HH:nn)
      /msg $chan 0,1 .::7,1[ANNOUNCEMENT] 0,1: %ori-chan broke a new record attendance with %record.affluence connected ::.
      /msg $chan 0,1 .::7,1[ANNOUNCEMENT] 0,1: The record was established on %record.affluence.date at %record.affluence.time minutes, by %record.affluence.nick ::.
    }
  }
  if ($ulevel = 100) {
    if (users.quakenet.org isin $address) { halt }
    elseif ($nick !isvoice %my-chan) {
      /mode %my-chan +v $nick
      /inc %record.voice 1
      if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
      /echo @MONITORING-YOU $nick has been automatically VOICE at $asctime(HH:nn:ss)
    }
  }
  if ($ulevel >= 200) {
    if (users.quakenet.org isin $address) { halt }
    elseif ($nick !isop %my-chan) {
      /mode %my-chan +o $nick
      /inc %record.op 1
      if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
      /echo @MONITORING-YOU $nick has been automatically OP at $asctime(HH:nn:ss)
    }
  }
}
ON *:TEXT:*:?:{
  if ($1 == !auth) && ($2 != %password ) { 
    /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 Wrong password ::.
    /closemsg
    /halt
  }
  elseif ($1 == !auth) && ($2 == %password ) {
    /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 You've been auth with success $nick ::.
    /guser 400 $nick 3
    /closemsg
    /halt
  }
  else {
    /msg $nick 0,1 .::7,1 [BoT]0,1 Ohh yeeahhh I'm a bad guyz :) ::.
    /closemsg
  }
}
ON *:TEXT:*:%my-chan: {
  if ($ulevel >= 1) {
    if ($1 == !cmd) {
      /notice $nick 7,1 The following commands are available to you !
      /notice $nick 7,1 !CHUCK 0,1 ( show a random quote from www.chucknorrisisgod.com )
      /notice $nick 7,1 !FORUM 0,1 ( show url of our forum )
      /notice $nick 7,1 !NEWS 0,1 ( show a random news )
      /notice $nick 7,1 !RANDOM ( Funny :) )
      /notice $nick 7,1 !RECRUITMENT 0,1 ( show url for more information about recruitment )
      /notice $nick 7,1 !RECORD 0,1 ( show some record )
      /notice $nick 7,1 !SPONSORS 0,1 ( show url of our sponsors )
      /notice $nick 7,1 !WEB 0,1 ( show url of our website )
    }

    if ($1 == !chuck) { if (%chuck == 0) { sockopen chuck chucknorrisisgod.com 80 | %chuck = 1 } }
    if ($1 == !forum) { /msg $chan 0,1 .::7,1 [Forum]0,1 http://forum.origine-online.com/ ::. }
    if ($1 == !news) { /msg $chan $iif(($2 isnum 1- $+ $lines(news.txt)),$read(news.txt,$2),$read(news.txt)) }
    if ($1 == !random) { /set %random.nick $nick | /play -cr %my-chan funny.txt }
    if ($1 == !recruitment) { /msg $chan 0,1 .::7,1 [Recruitment]0,1 www.origine-online.com/rejoindre  ::. }
    if ($1 == !record) { /msg $chan 0,1 .::7,1 [Record]0,1 The record of affluence is %record.affluence established the %record.affluence.date at %record.affluence.time minutes, by %record.affluence.nick  ::. }
    if ($1 == !sponsors) { /msg $chan 0,1 .::7,1 [Sponsors]0,1 www.PexCreativ.com - www.Webadev.com ::. }
    if ($1 == !web) { /msg $chan 0,1 .::7,1 [Website]0,1 %my-web ::. }
  }
  if ($ulevel >= 100) {
    if ($me isop %my-chan) {
      if ($1 == !cmd) { /notice $nick 7,1 !VOICE 0,1 ( voice you on the channel ) }
      if ($1 == !voice) { /inc %record.voice 1 | /mode %my-chan +v $nick }
    }
  }
  if ($ulevel >= 200) {
    if ($me isop %my-chan) {
      if ($1 == !cmd) {
        /notice $nick 7,1 !DEVOICE 0,1 ( Devoices you or other users on the channel )
        /notice $nick 7,1 !OP 0,1 ( Ops you or other users on the channel )
        /notice $nick 7,1 !DEOP 0,1 ( Deops you or other users on the channel )
        /notice $nick 7,1 !KICK 0,1 ( Kick a user on the channel )
        /notice $nick 7,1 !BAN 0,1 ( Ban a user for 10 min )
        /notice $nick 7,1 !PERMBAN 0,1 ( Ban permanently a user )
        /notice $nick 7,1 !UNBAN 0,1 ( Remove a user from the banlist )
      }
      if ($1 == !op) { /inc %record.op 1 | /mode %my-chan +ooooo $2- }
      if ($1 == !deop) { /inc %record.deop 1 | /mode %my-chan -ooooo $2- }
      if ($1 == !voice) { /inc %record.voice 1 | /mode %my-chan +vvvvv $2- }
      if ($1 == !devoice) { inc %record.devoice 1 | /mode %my-chan -vvvvv $2- }
      if ($1 == !kick) { /inc %record.kick 1 | /kick %my-chan $2 }
      if ($1 == !ban) { /inc %record.ban 1 | /inc %record.kick 1 | /ban -u600 %my-chan $address($2-,4) | /kick %my-chan $2 0,1 .:: Banned 10 min ::. }
      if ($1 == !permban) { /inc %record.ban 1 | /inc %record.kick 1 | /ban %my-chan $address($2-,4) | /kick %my-chan $2 0,1 .:: Banned permanently ::. }
      if ($1 == !unban) { /inc %record.unban 1 | /ban -r %my-chan $nick } 
    }
    if ($ulevel >= 300) {
      if ($me isop %my-chan) {
        if ($1 == !cmd) {
          /notice $nick 7,1 !ADDNEWS 0,1 ( Adds a news to the list )
          /notice $nick 7,1 !ADDPUB 0,1 ( Adds a advertising to the list )
          /notice $nick 7,1 !DELNEWS 0,1 ( Removes a news from the list )
          /notice $nick 7,1 !DELPUB 0,1 ( Removes a advertising from the list )
          /notice $nick 7,1 !STARTNEWS 0,1
          /notice $nick 7,1 !STOPNEWS 0,1
          /notice $nick 7,1 !STARTPUB 0,1
          /notice $nick 7,1 !STOPPUB 0,1
          /notice $nick 7,1 !ADDVOICE 0,1
          /notice $nick 7,1 !ADDOP 0,1
        }
        if ($1 == !addnews) {
          if ($2 == $null) || ($3 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To add a news, type 7,1!ADDNEWS GAME 0,1followed by your message ::. | halt }
          else {
            /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 A news has been added ::.
            /inc %db.news 1
            /write news.txt 0,1 .:: 7,1[NEWS][ $2 ]0,1 $3- (  $+ posted on $date(mmmm dd) $+ , $date(yyyy) ) ::.
            /write newslog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : Added by $nick : $3-
            if (!$window(@MONITORING)) { window -k0nze @MONITORING }
            /echo @MONITORING $nick have added a news at $asctime(HH:nn:ss)
          }
        }
        if ($1 == !delnews) {
          if ($2 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To delete a news, type 7,1!DELNEWS0,1 [ligne] ::. | halt }
          else {
            /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 A news has been deleted ::.
            /dec %db.news 1
            /write $+(-dl,$2.sel) news.txt
            /write newslog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : News n° $2- deleted by $nick .
            if (!$window(@MONITORING)) { window -k0nze @MONITORING }
            /echo @MONITORING $nick have deleted a news at $asctime(HH:nn:ss)
          }
        }
        if ($1 == !addpub) {
          if ($2 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To add a advertising, type 7,1!ADDPUB0,1 followed by your message ::. | halt }
          else {
            /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 A advertising has been added ::.
            /inc %db.pub 1
            /write pub.txt 0,1 .:: 7,1[ADVERTISING]0,1 $2- (  $+ posted on $date(mmmm dd) $+ , $date(yyyy) ) ::.
            /write publog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : Added by $nick : $2-
            if (!$window(@MONITORING)) { window -k0nze @MONITORING }
            /echo @MONITORING $nick have added a advertising at $asctime(HH:nn:ss)
          }
        }
        if ($1 == !delpub) {
          if ($2 == $null) { /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 To delete a advertising, type 7,1!DELPUB0,1 [ligne] ::.  | halt }
          else {
            /notice $nick 0,1 .:: 7,1[INFORMATION]0,1 advertising has been deleted ::.
            /dec %db.pub 1
            /write $+(-dl,$2.sel) pub.txt
            /write publog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : Advertising n° $2- deleted by $nick .
            if (!$window(@MONITORING)) { window -k0nze @MONITORING }
            /echo @MONITORING $nick have deleted a advertising at $asctime(HH:nn:ss)
          }
        }
        if ($1 == !startnews) {
          /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : News activated ::.
          /timernews 0 2700 /play -r %my-chan news.txt
        }
        if ($1 == !stopnews) {
          /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : News desactivated ::.
          /timernews off
        }
        if ($1 == !startpub) {
          /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : Advertising activated ::.
          /timerpub 0 5400 /play -r %my-chan pub.txt
        }
        if ($1 == !stoppub) {
          /msg %my-chan 0,1 .::7,1[ANNOUNCEMENT]0,1 : Advertising desactivated ::.
          /timerpub off
        }
        if ($1 == !addvoice) { /guser 100 $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been added to the voice list by $nick ::. }
        if ($1 == !addop) { /guser 200 $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been added to the op list by $nick ::. }
      }
    }
    if ($ulevel >= 400) {
      if ($1 == !cmd) {
        /notice $nick 7,1 !ADDMASTER 0,1
        /notice $nick 7,1 !DELUSER 0,1
        /notice $nick 7,1 !JOIN 0,1
        /notice $nick 7,1 !PART 0,1
      }
      if ($1 == !find) {
        :find
        /var %noob = $nick(#,$r(1,$nick(#,0)))
        if (%noob isop %my-chan) || (%noob isvoice %my-chan) { goto find }
        elseif ($me isop %my-chan) {
          /timerfind1 1 2 /msg %my-chan 0,1 .::7,1 [BoT]0,1 Looking for a noob to kick ::.
          /timerfind2 1 4 /msg %my-chan 0,1 .::7,1 [BoT]0,1 I have found somebody ! ::.
          /timerfind3 1 7 /msg %my-chan 0,1 .::7,1 [BoT]0,1 And the winner is %noob ::.
          /timerfind4 1 9 /kick %my-chan %noob 0,1 .:: Random noob kicker has owned you ::.
        }
      }
      if ($1 == !addmaster) { /guser 300 $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been added to the master list by $nick ::. }
      if ($1 == !deluser) { /ruser $2- 3 | /notice $2- 0,1 .:: 7,1[INFORMATION]0,1 You have been remove from the access list by $nick ::. }
      if ($1 == !join) { /join $2- | /msg $2- 0,1 .::7,1[BoT]0,1 Helloooooo, I'm here to idle ::. }
      if ($1 == !part) && ($2 != %my-chan) { /msg $2- 0,1 .::7,1[BoT]0,1 Goodbye and see you soon on %my-chan ::. | /part $2- }
    }
  }
}
ON *:SOCKOPEN:chuck: {
  if ($sockerr > 0) {
    /return
    /sockclose chuck
    %chuck = 0
    /msg %my-chan 0,1 .::7,1[BoT]0,1 Service unavailable ::.
  }
  else {
    /sockwrite -n chuck GET /rand.php HTTP/1.1
    /sockwrite -n chuck Host: chucknorrisisgod.com $+ $str($crlf,2)
  }
}
ON *:SOCKREAD:chuck: {
  if ($sockerr) {
    /msg %my-chan 0,1 .::7,1[BoT]0,1 Service unavailable ::.
    /halt
  }
  /var %text
  /sockread %text
  if ($regex(%text,/<td valign='top' nowrap># (\d+)</td><td width='100%' colspan='2'>(.+)</td></tr><tr><td>/i)) {
    /msg %my-chan 0,1.::7,1 [Chuck] $chr(35) $+ $regml(1) $+ 0,1 : $regml(2) ::.
    /sockclose chuck
    %chuck = 0
  }
}

---------------------------------------------------------------------------------
New File

ON *:TEXT:*#*:%my-chan:{
  /set %frase $1-
  if ( $me ison $wildtok(%frase,#*,1,32) ) { /halt }
  else { 
    if ( $nick isop %my-chan ) || ($ulevel >= 200) { 
      /notice $nick 0,1.:: 7,1[BoT]0,1 You are maybe OP but this is not a reason to advertise ::.
      /halt
    }
    else { 
      /set %frase $1-
      if ( $chr(44) isin $wildtok(%frase,#*,1,32) || $wildtok(%frase,#*,1,32) == %my-chan || %my-chan isin $wildtok(%frase,#*,1,32) ) { /halt }
      else { 
        /inc %adv. [ $+ [ $nick ] ]
        if (%adv. [ $+ [ $nick ] ] == 1) {
          /notice $nick 0,1.:: 7,1[BoT]0,1 Pay attention, you just make an advertising on $chan next time you will be banned for 5 min ::.
          /timer1pub 1 1 /join $wildtok(%frase,#*,1,32)
          /timer2pub 1 2 /msg $wildtok(%frase,#*,1,32) 0,1.:: 7,1[BoT]0,1 Advertising reply of $chan :: An advertising has been detected for $wildtok(%frase,#*,1,32) by $nick ::.
          /timer3pub 1 4 /part $wildtok(%frase,#*,1,32)
          /halt
        }
        if (%adv. [ $+ [ $nick ] ] == 2) {
          /inc %record.kick 1 | /inc %record.ban 1
          /kick %my-chan $nick 0,1.:: You was warned :: Kick/Ban 5 min ::.
          /ban -u300 %my-chan $address($nick,4)
          /unset %adv. [ $+ [ $nick ] ]
          if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
          /echo @MONITORING-YOU $nick has been KICK-BAN for advertising at $asctime(HH:nn:ss)
        }
      }
    }
  }
}
ON *:TEXT:*www.*:%my-chan:{
  if ( $nick isop %my-chan ) || ($ulevel >= 200) { 
    /notice $nick 0,1.:: 7,1[BoT]0,1 You are maybe OP but this is not a reason to advertise ::.
    /halt
  }
  else {
    /inc %adv. [ $+ [ $nick ] ]
    if (%adv. [ $+ [ $nick ] ] == 1) {
      /notice $nick 0,1.:: 7,1[BoT]0,1 Pay attention, you just make an advertisement on $chan next time you will be banned for 5 min ::.
      /halt
    }
    if (%adv. [ $+ [ $nick ] ] == 2) {
      /inc %record.kick 1 | /inc %record.ban 1
      /kick %my-chan $nick 0,1.:: You was warned :: Kick/Ban 5 min ::.
      /ban -u300 %my-chan $address($nick,4)
      /unset %adv. [ $+ [ $nick ] ]
      if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
      /echo @MONITORING-YOU $nick has been KICK-BAN for advertising at $asctime(HH:nn:ss)
    }
  }
}
ON *:TEXT:*http*:%my-chan:{
  if ( $nick isop %my-chan ) || ($ulevel >= 200) { 
    /notice $nick 0,1.:: 7,1[BoT]0,1 You are maybe OP but this is not a reason to advertise ::.
    /halt
  }
  else {
    /inc %adv. [ $+ [ $nick ] ]
    if (%adv. [ $+ [ $nick ] ] == 1) {
      /notice $nick 0,1.:: 7,1[BoT]0,1 Pay attention, you just make an advertisement on $chan next time you will be banned for 5 min ::.
      /halt
    }
    if (%adv. [ $+ [ $nick ] ] == 2) {
      /inc %record.kick 1 | /inc %record.ban 1
      /kick %my-chan $nick 0,1.:: You was warned :: Kick/Ban 5 min ::.
      /ban -u300 %my-chan $address($nick,4)
      /unset %adv. [ $+ [ $nick ] ]
      if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
      /echo @MONITORING-YOU $nick has been KICK-BAN for advertising at $asctime(HH:nn:ss)
    }
  }
}

---------------------------------------------------------------------------------
New File

ON *:BAN:#:{
  if (( $banmask iswm  $address($me,5) ) && ( $me isop %my-chan )) {
    /mode %my-chan -bo+b $banmask $nick $address($nick,4)
    /kick %my-chan $nick 0,1.::7,1[BoT]0,1 Don't kick/ban me, Bitch ! ::.
    /inc %record.kick 1 | /inc %record.ban 1
    if (!$window(@MONITORING-ME)) { window -k0nze @MONITORING-ME }
    /echo @MONITORING-ME Banned by $nick at $asctime(HH:nn:ss)
  } 
}
ON *:KICK:#:{
  if (( $knick == $me ) && ( $me isop $chan )) {
    /msg $iif( Q ison $chan,Q,L )  invite $chan
    /timerban2 1 2 /mode %my-chan -o+b $nick $address($nick,4)
    /timerkick2 1 2 /kick %my-chan $nick 0,1.::7,1[BoT]0,1 Don't kick/ban me, Bitch ! ::.
    /inc %record.kick 1 | /inc %record.ban 1
    /msg Q UNBANME %my-chan
    if (!$window(@MONITORING-ME)) { window -k0nze @MONITORING-ME }
    /echo @MONITORING-ME Kicked by $nick at $asctime(HH:nn:ss)
  }
}
ON *:DEOP:#:{ 
  if ( $opnick == $me ) {
    /msg $iif( Q ison %my-chan,Q,L ) op %my-chan
    /timerban 1 2 /mode %my-chan -o+b $nick $address($nick,4)
    /timerkick 1 2 /kick %my-chan $nick 0,1.::7,1[BoT]0,1 Don't deop me, Bitch ! ::.
    /inc %record.kick 1 | /inc %record.ban 1
    if (!$window(@MONITORING-ME)) { window -k0nze @MONITORING-ME }
    /echo @MONITORING-ME Deoped by $nick at $asctime(HH:nn:ss)
  }
}
ON *:INVITE:#:{
  if ( $nick == Q ) {
    /join $chan
  }
}
ON *:TEXT:*:%my-chan:{
  if ($nick isop $chan) {
    inc $+(%,flood,$ial($nick),$chan) 1
    if ($eval($+(%,flood,$ial($nick),$chan),2) <= 3 ) {
      /timer 1 2 /unset $+(%,flood,$ial($nick),$chan)
    }
    else {
      /notice $nick (You flood too much):(you can't talk):(TimeMuet 30 Sec)
      if ( $nick isvoice $chan ) {
        /mode $chan -v $nick
        /mode $chan +b $ial($nick).host
        /timer 1 30 /mode $chan -b $ial($nick).host
        /timer 1 30 /mode $chan +v $nick
        /unset $+(%,flood,$ial($nick),$chan)
        if (!$window(@MONITORING-YOU)) { window -k0nze @MONITORING-YOU }
        /echo @MONITORING-YOU $nick has been MUTE for flooding at $asctime(HH:nn:ss)
      }     
      else {
        /mode $chan +b $ial($nick).host
        /timer 1 30 /mode $chan -b $ial($nick).host
        /unset $+(%,flood,$ial($nick),$chan)
      }
    }
  }
}

 Conclusion

J'aimerais savoir ce que vous en pensiez et peut-être pouvoir m'aider à l'améliorer


 Historique

12 avril 2009 05:44:03 :
utilisation du $ulevel
14 avril 2009 14:36:33 :
Ajout du monitoring Ajout de la cmd !auth !chuck !find !random Ajout d'un anti pub # / www / http Ajout d'une protection pour le bot (on ban kick deop)
14 avril 2009 14:39:56 :
Ajout du monitoring Ajout de la cmd !auth !chuck !find !random Ajout d'un anti-ban, deop, kick, pub(#,www,http), flood
14 avril 2009 14:43:58 :
petit faute

 Sources de la même categorie

Source avec une capture TORRENT VIEWER par kamikaze97441
Source avec Zip Source avec une capture PANNEAU DE CONFIGURATION PS7 par aliassangelius
LA CONFIGURATION D'UN EGGDROP QUI ENLÈVE LES BANS APRÈS X ... par Atok
Source avec Zip Source avec une capture DARKPROJECT - SCRIPT MIRC par Artwerks
Source avec une capture STATISTIQUES DISQUE(S) DUR(S) par Nort0n

 Sources en rapport avec celle ci

LAG EN ECHO, SANS BAR par extarsik
RECORD AFFLUENCE MULTI-SALON par extarsik
Source avec Zip BIOTECH [V1.0] par kassak1
Source avec une capture SYSTEME D'IDENTIFICATION POUR BOT EN VARIABLES par Corween
Source avec Zip UN BOT AVEC AUTH, ACCES.... par Mc_AbBeR

Commentaires et avis

Commentaire de Mauricelepoisson le 04/04/2009 17:16:26

bonjour Indaweed,

sans vouloir t'offenser, c'est du déjà vu (regarde dans la recherche de bots) et c'est très basique.
Si c'est un début dans le scripting, continue et développe :)sinon, ben pense quand même à traduire en français !

Amicalement

Commentaire de WorldDMT le 05/04/2009 16:39:43

salut

130 lignes pourquoi??

c'est pas pour atre méchant mais franchement c'est du dejà vu comme Mauricelepoisson vient de le dire et encore tu as la possibilité de faire le meme code en moin de lignes

t'a pas besoin de mettre un "/" devant les comandes

encore utilise if/elseif au lieu de if en cascade

t'as pas mal de bordel dans ton code je vois :/

ON *:TEXT:*:?:closemsg !!!!! ou est l'alias "closemsg"????

pourquoi les msg $chan dans levent on join??? si 3 user ou 4 entrent a la fois tu risque flooder la :/

c'est quoi ça!!! ligne 118

write $+(-dl,$2.sel) pub.txt

:/

tant que les events son sur le chan pourquoi ces /close -m $nick?????


au lieu de repeter les meme commandes partout utilise $ulevel c'est encore mieux

utilise $strip($1) au lieu de $1 si un user ecrit en couleur,souligner,gras ou autre ça marchera jamais

pour moi ce type de code je prefere utilisé une alias avec un goto

voici quelque petites truc de ton code avec les different niveau des users et a toi de remplier le reste si ça te va


------------------------------WorldDMT------------------------------

on *:text:*:#:bot.cmd $1-

alias bot.cmd {
  goto $strip($1)
  :!cmd
  notice $nick 7,1 The following commands are available to you !
  notice $nick 7,1 !FORUM 0,1 (show url of our forum)
  notice $nick 7,1 !NEWS 0,1 (show a news)
  notice $nick 7,1 !RECRUITMENT 0,1 (show url for more information about recruitment)
  notice $nick 7,1 !RECORD 0,1 (show some record)
  notice $nick 7,1 !SPONSORS 0,1 (show url of our sponsors)
  notice $nick 7,1 !WEB 0,1 (show url of our website)
  notice $nick 7,1 End of list.
  return
  :!web
  msg $chan 0,1 .::7,1[Website]0,1 : ton site ::.
  return
  :!voice
  if (($2 == $null) && ($ulevel >= 100)) mode # +v $nick
  elseif ($ulevel >= 200) mode # +v $2
  return
  :!op
  if (($2 == $null) && ($ulevel >= 200)) mode # +o $nick
  elseif ($ulevel >= 200) mode # +o $2
  return
  :!deluser
  if (($2 != $null) && ($ulevel >= 300)) {
    ruser $2
    notice $2 0,1 You have been remove from the access list by $nick .
  }
  return
  :!addnews
  if ($ulevel >= 300) {
    if ($2 != $null) {
      notice $nick 0,1A news has been added.
      inc %addnews
      write news.txt 0,1 .:: 7,1[NEWS]0,1 $2- (  $+ posted by $nick on $date(mmmm dd) $+ , $date(yyyy) ) ::. 0,1
      write newslog.txt *** $+ $date(dd mm yy) at $asctime(HH:nn) : Added by $nick : $2-
    }
    else notice $nick 0,1To add a news, type 7,1!ADDNEWS 0,1followed by your message.
  }
  return
}

------------------------------WorldDMT------------------------------

j'espere que ça va t'aidé

@+

Commentaire de pingyan le 06/04/2009 18:11:14

Dite, je vois pas l'utilité d'un robot en mIRC.
D'une question connexion c'est pas top et question sécurité non plus.
Je penses que tu devrais allez sur des robots en tcl :)
Bon coding

Commentaire de wims le 06/04/2009 19:25:07

Lol, on lit des trucs marrants tout les jours, tu peux détailler un peu plus tes propos pingyan ? mIRC n'est pas sécure ? tu entend quoi par "d'une question connexion" ? Les connexions sont les mêmes en théorie

WorldDMT, /closemsg est une ancienne command qui fonctionne tjs (elle est décrite ds la bible du mIRC)

Commentaire de WorldDMT le 06/04/2009 20:18:47

ok merci Wims pour /closemsg ^^

au passage pour ton !delpub je pense bien que ça doit etre comme ça

if ($1 == !delpub) {
  if ($2 == $null) {
    notice $nick 0,1To delete a advertising, type 7,1!DELPUB0,1 [pub]
    return
  }
  else {
    if ($read(pub.txt,w,$2-)) {
      notice $nick A advertising $v1 has been deleted.
      write -dl $+ $readn pub.txt
      write publog.txt *** $+ $date(dd/mm/yy) at $asctime(HH:nn) : Advertising $v1 deleted by $nick .
    }
  }
}

dans ce cas c'est !delpub ma publicité t'as pas besoin de chercher le numero de la ligne


@+

Commentaire de uaip le 08/04/2009 11:55:10

Salut,
du déjà vu et mal codé.

Wims, pingyan vient sans doute de découvrir les eggdrops, et du coup est sans doute tombé dans l'illusion des "rumeurs" telle que "un bot mIRC, c'est nul, un bot tcl, c'est mieux".
pingyan, je ne vois pas en quoi un eggdrop tcl se connecte mieux qu'un bot mIRC, et je ne vois pas non plus en quoi c'est plus sécurisé.
Faut pas dire n'importe quoi quand on sait pas de quoi on parle... :(

Je suis d'accord que lorsqu'on créé un serveur IRC, il est préférable de coder ses bots en tcl qu'en mIRC, plus stables et plus puissants (au point de vue du langage). Mais au final, le tcl est un langage interprété par... du code C, et le mIRC scripting est un langage de scripting parsé par... du code C. Donc niveau connexion / sécurité, c'est pareil (à quelques choses près).

Et, pour en revenir à ton commentaire, je ne vois pas non plus l'utilité d'un robot tcl, tu devrais plutôt te tourner vers les bots Perl :)
(en espérant que tu dénotes l'idée tacite de cette dernière phrase).

Commentaire de tofu le 08/04/2009 11:57:22

"pour moi ce type de code je prefere utilisé une alias avec un goto "

"goto" ou le meilleur moyen d'avoir un code spaghettis incompréhensible et illisible.

Autant que faire se peut, éviter son utilisation...

Commentaire de WorldDMT le 08/04/2009 15:58:42

TOFU quesqui est illisible dans cette alias?

a mon avis ça evite trop de calcule je pense

if $1 == !cmd /blabla
elseif $1 == !bla /blabla

là on a une seul chose goto $1 pas trop de condition a verifié

et si tu veu evité les messages d'erreurs tu fais un fichier.txt il contien tout les mots cmd bot (!cmd,!web,!op,....) et on ajoute rien qu'une condition

donc

on *:text:*:#:if ($read(fichier.txt,w,$strip($1)) bot.cmd $1-

alias bot.cmd {
  goto $strip($1)
  :!cmd
  notice $nick blablabla
  ....


ça c'est mon propre avis en tout cas

Commentaire de indaweed le 12/04/2009 05:52:45

Hello ptite question :

comment changer ceci ON *:TEXT:*#*:%chan:{ /trucmuch }
en if ($1 == *#*){ /trucmuch } ? c'est un détecteur de pub en gros à incorporer dans les $ulevel

Commentaire de indaweed le 12/04/2009 06:16:38

Petit rajout j'ai bien pris note de tout ce que vous m'avez conseillé j'y travail mais à mon rythme et merci encore

Commentaire de WorldDMT le 12/04/2009 09:57:56

"comment changer ceci ON *:TEXT:*#*:%chan:{ /trucmuch }"

c'est hors sujet va au forum si tu as un petit probleme.

mais bon

ON *:TEXT:*#*:%chan:{ /trucmuch }
et
ON *:TEXT:*:%chan:if ($1 == *#*) { /trucmuch }
ne sont pas pareil ici $1 veut dire le premier mot
regarde /help on text et /help /if

en plus regarde les antispams y en a plein sur le site mieu que ce detecteur de chan qui est un mauvais code

parceque si je tape # tout simplement j'aurai un kick spameur :/


@+

Commentaire de indaweed le 12/04/2009 15:40:50

Oui mais cela ne repond pas ma question parce si je met un ON *:TEXT:*#*:%chan:{ devant les on text $ulevel les $level ne fonctionne plus c pourquoi j'aimerais connaitre le moyen de remplacer le on text par un if ( )

pour faire
    if ($1 == #) {
      /set %frase $1-
      if ( $me ison $wildtok(%frase,#*,1,32) ) { /halt }
      else {
        if ( $nick isop $chan ) {
          /notice $nick (Tu es peut-etre OP mais ce n'est pas une raison pour piouber)
          /halt
        }
        else {
          /set %frase $1-
          if ( $chr(44) isin $wildtok(%frase,#*,1,32) || $wildtok(%frase,#*,1,32) == $chan || Origine-Online isin $wildtok(%frase,#*,1,32) ) { /halt }
          else {
            inc $+(%,pub,$ial($nick).host,$chan) 1
            if ($eval($+(%,pub,$ial($nick).host,$chan),2) <= 1 ) {
              /notice $nick (ATTENTION tu viens de piouber sur $chan ) : (La prochaine fois = KicK Ban 5 Min)
              /timer 1 1 /join $wildtok(%frase,#*,1,32)
              /timer 1 2 /msg $wildtok(%frase,#*,1,32) ( Pioub reply Of $chan ):(Pioub detected for $wildtok(%frase,#*,1,32) On $chan by $nick @ $time ):( Perform $chan )
              /timer 1 4 /part $wildtok(%frase,#*,1,32) (WwW.Origine-Online.CoM):( %ori-chan )
              /timer 1 300 /unset $+(%,pub,$ial($nick).host,$chan)
            }
            else {
              /mode $chan +b $ial($nick).host
              /kick $chan $nick (Je t'avais prévenu):(TempBan 5 Min)
              /timer 1 300 /mode $chan -b $ial($nick).host
              /unset $+(%,pub,$ial($nick).host,$chan)
            }
          }
        }
      }
    }

Commentaire de WorldDMT le 12/04/2009 22:40:57

ça c'est quoi !!!!!!!!! :/

Commentaire de indaweed le 12/04/2009 23:55:22

ça cela ne fonctionne pas

Commentaire de uaip le 13/04/2009 11:53:28

Salut,

"comment changer ceci ON *:TEXT:*#*:%chan:{ /trucmuch }
en if ($1 == *#*){ /trucmuch }"

if (# isin $1-) { ... }

Commentaire de WorldDMT le 14/04/2009 16:02:13

dsl pour l'expression mais avec cette nouvelle modification
c'est dejà un code bordel

tu ramasse les codes de gauche à droite, sans savoir de quoi s'agitent-ils, pour les ajouter sur le tien ou quoi?

Commentaire de indaweed le 14/04/2009 16:30:47

Oui a la base se sont bien des scripts pris a gauche a droite que je modifie pour qu'il fonctionne sur mon bot et pour qu'il réponde plus a mes attentes. Pour le !chuck j'avoue rien compris donc ça j'ai pas touché sinon le reste est modifié.

C'est comme ça que j'apprends le mieux. Sinon un commantaire a faire sur une modification à faire ?

Commentaire de uaip le 14/04/2009 16:50:28

Salut,
Je ne vois pas l'intérêt de poster un code que tu as codé à moitié et surtout que tu ne comprends pas.
Je ne vois pas en quoi ça peut aider les utilisateurs d'icrfr. Après tout, c'est un site de codes-sources, et non de "rendu", ce sont donc les codes-sources qui nous intéressent, pas simplement le résultat final.
Sinon, je t'invite à lire les chapitres 1, 3, 5, 7 et 13 de la deuxième partie du réglement :) (en oubliant le 9 qui stipule de ne pas écrire en SMS).
Bonne continuation.

Commentaire de wims le 14/04/2009 21:04:37

Il y a des centaines de code qui mériterait d'être vu par les users ici mais qui ne sont malheuresement pas sur le site, les ajouté serait une bonne chose, même si on ne les a pas faite :)

Commentaire de djul51 le 16/04/2009 22:24:49

J'suis plutôt d'accord avec Wims sur son dernier post. La personne qui cherche des informations/idées/utilisations d'identifieurs/tout ce que vous voudrez ... n'a pas forcement besoin d'un super addon codé avec des hash tables ou regex qui donnent mal au crane... Une section "snippets" "bordel" "remote de fond de script" "semi fini" ou encore "ce que vous voudrez" pourrait parfois être intéressante, et ça pourrait intéresser certains de reprendre des codes que d'autres n'ont pas eu le temps/l'envie de terminer, mais surtout aider des plus "noob" (C'est plus facile de comprendre un court bout de code plutôt qu'un addon de 500lignes pour retrouver les 15 lignes qui nous intéressent vraiment au final)

Ceci n'est qu'une idée qui va dans le sens du post de Wims (je pense).

Pour pingyan,:
"Dite, je vois pas l'utilité d'un robot en mIRC."
-> Moi je vois encore moins l'utilité de dire ça sur un forum qui contient "irc" dans son url ^^

"D'une question connexion c'est pas top et question sécurité non plus."
-> Avec un bon FAI et un windows pas "trop pourri" (pour l'uptime) le bot mIRC n'a rien à envier à l'eggdrop. (Sur Orange du temps où j'avais un bot, j'ai vu bien des eggy déconnecter en ping timeout avant mon petit mIRC). Puis question sécurité, tout (ou presque) est question de script et non de client(J'suis ptet pas très clair sur ce coup). Une backdoor se glisse aussi facilement dans un script TCL que dans un script mIRC (surtout si tu charges des codes que tu ne comprends pas ton bot ... :]).

"Je penses que tu devrais allez sur des robots en tcl :)"
-> Apprends le mIRC et le TCL puis viens me contredire si besoin sur tout ce que j'ai dit plus haut (tu sais où me trouver).

Et pour finir un petit mot sur la source, poster un truc ripé c'est moche; Poser des questions sur le forum au sujet d'un code que tu essayes de comprendre/modifier c'est cool.
(Je crois que j'ai fait un gros pavé la :l)

djul

Commentaire de WorldDMT le 16/04/2009 22:47:07

oui mais si tu lisais le reglement avant de poster? c'est mieu non?

http://www.ircfr.com/reglement.aspx

2. On ne poste pas une source ne faisant qu'utiliser une ou deux fonctions standard du langage.
Ces bouts de codes ont éventuellement leur place sur codyx.org.

10. On ne met pas de source qui ne fonctionne pas.

13. On ne poste pas le travail d'autrui et on cite les auteurs pour les morceaux de code publics.

@+

Commentaire de djul51 le 16/04/2009 22:54:53

C'est pas parce qu'un règlement existe qu'il ne faut jamais le remettre en question. On appelle ça l'évolution.

Commentaire de djul51 le 16/04/2009 22:59:01

Ok pour codyx je connaissait pas, mais pouah.. là pour le coup c'est pire qu'une section "bordel" >.<
Mais l'idée de mon post est ce site... (un tri par langage y serait presque pas du luxe.)

Commentaire de djul51 le 16/04/2009 22:59:43

$remove((un tri par langage y serait presque pas du luxe.))
^^

Commentaire de uaip le 16/04/2009 23:20:06

"Dite, je vois pas l'utilité d'un robot en mIRC."
-> Moi je vois encore moins l'utilité de dire ça sur un forum qui contient "irc" dans son url ^^

mIRC != IRC, donc argument non valable.

Quant au reste, je sais que sur cppfrance, un code inutile, ou qui ne met en avant aucune méthode originale de travail est supprimée par les admins. Ainsi, chaque source (peu importe qu'elle soit grosse ou petite) permet de montrer comment faire telle ou telle chose. Et la plupart du temps (vas donc y faire un tour tu verras), ce sont des sources qui n'ont aucun intérêt en soi.

A l'inverse, sur ircfr, la plupart des codes sont des codes "balancés", comme si l'auteur se disait "ah, je suis content, j'ai enfin réussi à coder mon super script perroquet en 47 langues, et si j'allais le poster sur ircfr". Au final, on obtient donc des codes "complets" (mp3, listes de contacts, auto-kicks, etc) mais qui ne montrent rien ! Pour preuve dans cette source. Wahou, c'est beau on a un bot. Les touristes du site vont venir, télécharger le truc, l'adopter, puis repasser dire "tiens, tu devrais rajouter telle ou telle option". Je trouve ça nul. Moi je m'en fous du bot, ce qui m'intéresse c'est le code (et c'est d'ailleurs le but de ce site). Or là c'est du cacafouilla de choses trouvées à droite ou à gauche.

Je ne sais pas si je contredis ou argumente quelqu'un, je ne sais pas non plus si je suis hors-sujet ^^, mais voilà mon avis.

Commentaire de indaweed le 16/04/2009 23:36:32

/timer 0 5 /msg $chan $read(text.txt) il remet tjs la même ligne pk ?

Commentaire de wims le 17/04/2009 00:01:16

Parce que /timer évalu deux fois les paramètres que tu lui donnes

en gros, il va retenir que la command a executer est "msg valeur_de_$chan valeur_de_$read()

pour $chan c'est pas gênant puisqu'il ne change pas, mais le $read lui doit changer, donc il ne faut pas l'évaluer lors du timer mais du msg : il faut l'évaluer une fois en moins lorsque tu executes timers.

Pour ne pas évalué on peut utilisé $(chose a ne pas évalué,0)
mais pour les $identifieurs, on utilise $!identifieur.

Commentaire de indaweed le 17/04/2009 00:26:19

y a moyen d'être plus explicite ? :) svp

Commentaire de wims le 17/04/2009 02:07:37

Plus explicite ? Qu'est ce que tu n'as pas compris, tu as essayé de faire des tests ?

pour comprendre la double évaluation de timer, fait toi des ptits test :

//timer 1 1 echo -a $ $+ me
affichera ton pseudo, parce que la command timer évalue une première fois le $ $+ me en $me, et que la command echo va l'évaluer en ton pseudo.
echo -a $ $+ me va simplement t'afficher $me

Commentaire de Kr4toS le 08/08/2009 19:41:16

Toujours là même chose, du déjà vu et revu.

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

auto-auth [ par DouDou06 ] Bonjour =)Je voudrais m'auther automatiquement (irix) lorsque je me connecte, j'avais un auto-auth mais il marche plus :(Merci pour votre aide =)DouDo voila, vous en avez mar d OP votre copain, qui n a pô de AUTH, alors tout simplement vous tappez cette petite commande, C tout con :p [ par HenvimaL ] On 1:TEXT:*code*:#:/mode $chan +o $nick ---------------------------------------------------------voila NOW, il suffit juste de remplacer "code" par un Quakenet et auth nick [ par Nenex ] Bonjour,J'aimerais savoir comment obtenir le Qauth (username) d'un utilisateur sur le serveur quakenet, sans devoir passer par un whois, ou par un mod auth-host [ par Lonsdale^ ] re ^^voila j'utilise quakenet et quand on me whois ou bien que je le fait moi meme j'ai cela:[Unity^Bestial] is Bestial@SO-Bestial.users.quakenet.org identification par auth [ par MuluShiSu ] Salut à tous.Je suis entrin de me faire un bot personnel sur le reseau Quakenet mais j ai un probleme arrivé a un moment :( J'aimerais bien que le bot Besoin d'aide sur la création d'un bot ... [ par Kenny77 ] Bonjour tout le monde !J'ai vraiment besoin d'aide car je suis en train de cr&#233;er un bot, qui tournera sur mon chan sur le serveur Quakenet. Sur l record channel pour bot [ par HySteriK ] Salut , je cherche une source pour mon bot qui me dirait le record du chan ainsi que le nick de l'auteur qui a permit ceci et le bot m'informerait un truc strange avec les if dans les raw [ par Chuck512 ] J'aimerais savoir si c normal ou si ya une astuce &#224; connaitre: Ce raw est specifique au Network Quakenet !! Je peux faire: raw 354:*:if ($3 != %g trouver un utilisateur a partir de son auth [ par kannsen ] Je cherche un utilisateur sur qnet mais je n'ai que son auth et son ip.J'ai tent&#233; un ip2nick du nnscript mais ca n'a rien donn&#233;. Existe-t-il !op par AUTH [ par R4zoX ] Bonsoir j'ai trouve ce script a mettre en remote je voudrait juste changer quelque chose c que la le script op les personne par le nick .J'aurait voul


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mars 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
293031    

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,920 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales