Remote + timer

ppzamateur Messages postés 29 Date d'inscription samedi 24 mai 2008 Statut Membre Dernière intervention 9 novembre 2009 - 26 oct. 2009 à 16:23
cougar_du_havre Messages postés 7 Date d'inscription samedi 13 mai 2006 Statut Membre Dernière intervention 17 novembre 2011 - 20 janv. 2010 à 23:53
voici un code entier, dans lequel; j'aimerais qu'on m'explique comment bloqué l'utilisation de chaque commande, pour 4 minute par salon...

exemple:
je suis sur #salon1
j'utilise la cmd : !cmd

les utilisateur qui sotn sur #salon2 #alon3 vont recevoir un msg en fonction de la demande...

je voudrais empecher les utilisateur de #salon1 d'utiliser !cmd pendant 4 minutes, pour les empecher de flooder.

voici mon code en entier.

1.
on 1:TEXT:warb0t*:#:{
2.
if ($nick isop $chan) {
3.
/msg $chan Yeah!? it's me! I'm the best of bots! ;D
4.
}
5.
}
6.

7.
on 1:TEXT:!cw:#:{
8.
if ($nick isop $chan) {
9.
/msg $chan [CW] Type !pcw[amount of players] [*information] :: without the "[" "]"
10.
}
11.
}
12.
on 1:TEXT:!cw1*:#:{
13.
if ($nick isop $chan) {
14.
/amsg [CW] $chan @Quakenet :: $nick :: Requested %1 (Infos: $2-)
15.
}
16.
}
17.
on 1:TEXT:!cw2*:#:{
18.
if ($nick isop $chan) {
19.
/amsg [CW] $chan @Quakenet :: $nick :: Requested %2 (Infos: $2-)
20.
}
21.
}
22.
on 1:TEXT:!cw3*:#:{
23.
if ($nick isop $chan) {
24.
/amsg [CW] $chan @Quakenet :: $nick :: Requested %3 (Infos: $2-)
25.
}
26.
}
27.
on 1:TEXT:!cw4*:#:{
28.
if ($nick isop $chan) {
29.
/amsg [CW] $chan @Quakenet :: $nick :: Requested 4o4 (Infos: $2-)
30.
}
31.
}
32.
on 1:TEXT:!cw5*:#:{
33.
if ($nick isop $chan) {
34.
/amsg [CW] $chan @Quakenet :: $nick :: Requested %5 (Infos: $2-)
35.
}
36.
}
37.
on 1:TEXT:!cw6*:#:{
38.
if ($nick isop $chan) {
39.
/amsg [CW] $chan @Quakenet :: $nick :: Requested %6 (Infos: $2-)
40.
}
41.
}
42.
on 1:TEXT:!cw7*:#:{
43.
if ($nick isop $chan) {
44.
/amsg [CW] $chan @Quakenet :: $nick :: Requested %7 (Infos: $2-)
45.
}
46.
}
47.
on 1:TEXT:!cw8*:#:{
48.
if ($nick isop $chan) {
49.
/amsg [CW] $chan @Quakenet :: $nick :: Requested %8 (Infos: $2-)
50.
}
51.
}
52.
on 1:TEXT:!pcw:#:{
53.
if ($nick isop $chan) {
54.
/msg $chan [PCW] Type !pcw[amount of players] [*information] :: without the "[" "]"
55.
}
56.
}
57.
on 1:TEXT:!pcw1*:#:{
58.
if ($nick isop $chan) {
59.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested %1 (Infos: $2-)
60.
}
61.
}
62.
on 1:TEXT:!pcw2*:#:{
63.
if ($nick isop $chan) {
64.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested %2 (Infos: $2-)
65.
}
66.
}
67.
on 1:TEXT:!pcw3*:#:{
68.
if ($nick isop $chan) {
69.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested %3 (Infos: $2-)
70.
}
71.
}
72.
on 1:TEXT:!pcw4*:#:{
73.
if ($nick isop $chan) {
74.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested 4o4 (Infos: $2-)
75.
}
76.
}
77.
on 1:TEXT:!pcw5*:#:{
78.
if ($nick isop $chan) {
79.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested %5 (Infos: $2-)
80.
}
81.
}
82.
on 1:TEXT:!pcw6*:#:{
83.
if ($nick isop $chan) {
84.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested %6 (Infos: $2-)
85.
}
86.
}
87.
on 1:TEXT:!pcw7*:#:{
88.
if ($nick isop $chan) {
89.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested %7 (Infos: $2-)
90.
}
91.
}
92.
on 1:TEXT:!pcw8*:#:{
93.
if ($nick isop $chan) {
94.
/amsg [PCW] $chan @Quakenet :: $nick :: Requested %8 (Infos: $2-)
95.
}
96.
}
97.
on 1:TEXT:!help:#:{
98.
/msg $chan [COMMANDS] !pcw !cw !msg !ringer !accept !mute !unmute !time !info
99.
/msg $chan [COMMANDS+] for more info about a command typ !help[COMMAND] (ex: !helpPCW)
100.
}
101.
on 1:TEXT:!msg*:#:{
102.
if ($nick isop $chan) {
103.
/amsg [MSG] $nick :: $2-
104.
}
105.
}
106.

107.
on 1:TEXT:!ringer1*:#:{
108.
if ($nick isop $chan) {
109.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 1 ringer (Infos: $2-)
110.
}
111.
}
112.
on 1:TEXT:!ringer2*:#:{
113.
if ($nick isop $chan) {
114.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 2 ringers (Infos: $2-)
115.
}
116.
}
117.
on 1:TEXT:!ringer3*:#:{
118.
if ($nick isop $chan) {
119.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 3 ringers (Infos: $2-)
120.
}
121.
}
122.
on 1:TEXT:!ringer4*:#:{
123.
if ($nick isop $chan) {
124.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 4 ringers (Infos: $2-)
125.
}
126.
}
127.
on 1:TEXT:!ringer5*:#:{
128.
if ($nick isop $chan) {
129.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 5 ringers (Infos: $2-)
130.
}
131.
}
132.
on 1:TEXT:!ringer6*:#:{
133.
if ($nick isop $chan) {
134.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 6 ringers (Infos: $2-)
135.
}
136.
}
137.
on 1:TEXT:!ringer7*:#:{
138.
if ($nick isop $chan) {
139.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 7 ringers (Infos: $2-)
140.
}
141.
}
142.
on 1:TEXT:!ringer8*:#:{
143.
if ($nick isop $chan) {
144.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 8 ringers (Infos: $2-)
145.
}
146.
}
147.
on 1:TEXT:!ringer9*:#:{
148.
if ($nick isop $chan) {
149.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 9 ringers (Infos: $2-)
150.
}
151.
}
152.
on 1:TEXT:!ringer10*:#:{
153.
if ($nick isop $chan) {
154.
/amsg [RINGER] $chan @Quakenet :: $nick ask for 10 ringers (Infos: $2-)
155.
}
156.
}
157.
on 1:TEXT:!ringer:#:{
158.
if ($nick isop $chan) {
159.
/msg $chan [RINGER] Type !ringer[amount of ringer] [ADDITIONAL INFO] :: without the "[" "]"
160.
}
161.
}
162.
on 1:TEXT:!msg:#:{
163.
if ($nick isop $chan) {
164.
/msg $chan [MSG+] type: !msg[message/request] :: without the "[" "]"
165.
}
166.
}
167.
on 1:TEXT:!helpPCW:#:{
168.
if ($nick isop $chan) {
169.
/msg $chan [PCW+] type: !pcw[amount of players] [*information] :: without the "[" "]"
170.
}
171.
}
172.
on 1:TEXT:!helpCW:#:{
173.
if ($nick isop $chan) {
174.
/msg $chan [CW+] type: !cw[amount of players] [*information] :: without the "[" "]"
175.
}
176.
}
177.
on 1:TEXT:!helpMSG:#:{
178.
if ($nick isop $chan) {
179.
/msg $chan [MSG+] type: !msg[message/request] :: without the "[" "]"
180.
}
181.
}
182.
on 1:TEXT:!helpRINGER:#:{
183.
if ($nick isop $chan) {
184.
/msg $chan [RINGER+] type: !ringer[amount of ringer] [ADDITIONAL INFO] :: without the "[" "]"
185.
}
186.
}
187.
on 1:TEXT:!helpACCEPT:#:{
188.
if ($nick isop $chan) {
189.
/msg $chan [ACCEPT+] !accept <name> (For example: !accept warb0t) To accept a pcw request.
190.
}
191.
}
192.
on 1:TEXT:!info:#:{
193.
/msg $chan [INFOS] warb0t v1.0 Coded by Miikeu`` for #urt-war thank's to Fleuv's idea.
194.
}
195.

196.
on 1:TEXT:!mute:#:{
197.
if ($nick isop $chan) {
198.
/msg $chan [MUTE] I don't have yet mute fonction. But if you don't want to receive my msg, type /mode $chan +T
199.
}
200.
}
201.
on 1:TEXT:!unmute:#:{
202.
if ($nick isop $chan) {
203.
/msg $chan [UNMUTE] I don't have yet unmute fonction. But if you don't want to receive my msg, type /mode $chan -T
204.
}
205.
}
206.
on 1:TEXT:!time:#:{
207.
if ($nick isop $chan) {
208.
/msg $chan [TIME] -------> $time :: $date
209.
}
210.
}
211.
on 1:TEXT:!join*:#:{
212.
if ($nick isop $chan) {
213.
if ($chan == #urt-war ) {
214.
/join $2-
215.
/msg $chan I joined $2-
216.
}
217.
}
218.
}
219.
on 1:TEXT:!leave*:#:{
220.
if ($nick isop $chan) {
221.
if ($chan == #urt-war ) {
222.
/leave $2-
223.
/msg $chan I left $2-
224.
}
225.
}
226.
}
227.
on 1:TEXT:!join2*:#:{
228.
if ($nick isop $chan) {
229.
if ($chan == #urt-war ) {
230.
/join $2-
231.
/msg $chan I joined $2-
232.

233.
}
234.
}
235.
}
236.
on 1:TEXT:!leave2*:#:{
237.
if ($nick isop $chan) {
238.
if ($chan == #urt-war ) {
239.
/leave $2-
240.
/msg $chan I left $2-
241.
}
242.
}
243.
}
244.
on 1:TEXT:!adminhelp:#:{
245.
if ($nick isop $chan) {
246.
if ($chan == #urt-war ) {
247.
/msg $nick [ADMIN commands] !join !leave
248.
/msg $nick [JOIN+] Type !join #channel
249.
/msg $nick [Leave+] Type !leave #channel
250.
/msg $nick [JOIN2+] Type !join2 #channel (for warb0t2)
251.
/msg $nick [Leave2+] Type !leave2 #channel (for warb0t2)
252.
}
253.
}
254.
}
255.

256.
on 1:TEXT:!accept:#:{
257.
if ($nick isop $chan) {
258.
/msg $chan [ACCEPT] !accept <name> (For example: !accept warb0t) To accept a pcw request.
259.
}
260.
}
261.

262.
on 1:TEXT:!accept*:#:{
263.
if ($nick isop $chan) {
264.
/msg $2- Hello, $nick accepted your pcw guy. Type /msg $nick to contact him.
265.
/msg $chan [ACCEPT] Done.
266.
}
267.
}




ne sois pas trop impatient... juste un peux ca suffira :)

3 réponses

WorldDMT Messages postés 871 Date d'inscription jeudi 6 juillet 2006 Statut Membre Dernière intervention 6 janvier 2012 1
27 oct. 2009 à 22:04
salut

c'est quoi ce truc personne aura envi de t'aider avec un code pareil enleve les numero de ligne ensuite poste

bref pour ton probleme ton code contient amsg donc envoie un message sur tout les chan dont ton bot est present utilise un simple "set -u" avec un condition regarde /help set

exp:

if (!%var) {
   amsg bla bla
   set -u %var 1
}

pour plus d'info au lieu de la condition if isop utilise un sufixe @
et tu peux utilisé un evenement on text avec des conditions avec $strip pour des cas de couleurs gras ou autre...
voici un exp de la ligne 7 jusqu'a la ligne 21

on @*:text:*:#:{
  if !cw == $strip($1) && !%wfld {
    msg # [CW] Type !pcw[amount of players] [*information] :: without the "[" "]"
    set -u240 %fld 1
  }
  elseif !cw1 == $strip($1) && !%wfld {
    amsg [CW] # @Quakenet :: $nick :: Requested %1 (Infos: $2-)
    set -u240 %fld 1
  }
  elseif !cw2 == $strip($1) && !%wfld {
    amsg [CW] # @Quakenet :: $nick :: Requested %2 (Infos: $2-)
    set -u240 %fld 1
  }
}


tu vois "set -u240" qui veut dire (240 sec = 4 min) mais normalement tu n'aura pas besoin de 4 min, 4 secondes seront suffisante mais a toi de voir
0
kimipuce Messages postés 1 Date d'inscription dimanche 28 décembre 2008 Statut Membre Dernière intervention 20 janvier 2010
20 janv. 2010 à 09:34
merci


tchat gratuit
http://www.tchat-land.be/
forum:http://tchat-
land-forum.forumactif.net/index.htm
venez nous rejoindre nous recretons pour le forum et le tchat.
0
cougar_du_havre Messages postés 7 Date d'inscription samedi 13 mai 2006 Statut Membre Dernière intervention 17 novembre 2011
20 janv. 2010 à 23:53
Sais un site de code source KIMIPUCE pas un site d'echange de lien en plus avec le nom de domaine que tu as tu vas t'attirer des ennuies pfffff
0
Rejoignez-nous