mIRC Home    About    Download    Register    News    Help

Print Thread
#34449 06/07/03 04:38 PM
Joined: Jul 2003
Posts: 4
M
Misato Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jul 2003
Posts: 4
i'm a newbie for coding irc ...
but i'd like to change some stuff , could you tell me how to change that :
Code:
 [18:28] <fly`> mm 

to
Code:
 (18:28) (@fly`) mm 


Moreover how to ad the status ( op/voice) ?

thx for the help and i didn t knew how to search that kind of info in the forum

Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Here is a script I wrote a while back that does what you are looking for web page




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:TEXT:*:#:{
if ($nick isop $chan) {
//echo $chan ( $+ $time $+ ) (@ $+ $nick $+ ) $1-
haltdef
}
elseif ($nick ishop $chan) {
//echo $chan ( $+ $time $+ ) (% $+ $nick $+ ) $1-
haltdef
}
elseif ($nick isvoice $chan) {
//echo $chan ( $+ $time $+ ) (+ $+ $nick $+ ) $1-
haltdef
}
else {
//echo $chan ( $+ $time $+ ) ( $+ $nick $+ ) $1-
haltdef
}
}
on *:INPUT:#:{
if ($left($1-,1) != /) {
.msg # $1-
}
if ($me isop $chan) {
//echo $chan ( $+ $time $+ ) (@ $+ $me $+ ) $1-
haltdef
}
elseif ($me ishop $chan) {
//echo $chan ( $+ $time $+ ) (% $+ $me $+ ) $1-
haltdef
}
elseif ($me isvoice $chan) {
//echo $chan ( $+ $time $+ ) (+ $+ $me $+ ) $1-
haltdef
}
else {
//echo $chan ( $+ $time $+ ) ( $+ $me $+ ) $1-
haltdef
}
}


new username: tidy_trax
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I still don't get why people use hard coded prefixes in the scripts, it makes the script larger, and it won't work on servers that have modes other than +ohv.

Code:
on ^*:TEXT:*:#:{
  echo $chan ( $+ $asctime($ctime,HH:nn) $+ ) ( $+ $iif($left($nick(#,$nick).pnick,1) isin $prefix,$ifmatch) $+ $nick $+ ) $1-
  haltdef
}
on *:INPUT:#:{
  if ($left($1-,1) != /) {
    .msg # $1-
    echo $chan ( $+ $asctime(HH:nn) $+ ) ( $+ $iif($left($nick(#,$me).pnick,1) isin $prefix,$ifmatch) $+ $me $+ ) $1-
    halt
  }
}


See how much shorter that code is? And it is even better since it will support whatever mode prefixes the server supports. And also, your's is severely broken. If I type /notice blah testing in a channel I see:
(13:57:33) (@codemastr) /notice blah testing

And the /notice isn't even sent. Also your lack of using ^ in the ON TEXT doesn't prevent the default event from triggering, so you see:
[13:58] <codemastr-> fdsdfsd
(13:58:08) (ccodemastr-) fdsdfsd

And lastly, he said he wanted the timestamp in (hour:min) form, not (hour:min:sec) form.

In the future you should test things before posting them, your code would expose nickserv passwords, and other personal information.

Joined: Jul 2003
Posts: 4
M
Misato Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jul 2003
Posts: 4
Othello : you're code is too big for me , and bit to difficult for me to only take what i need ... so i didn t try it , but thx =)

pheonix : i've tried ur code but I have the same problems as codemast
Quote:
[13:58] <codemastr-> fdsdfsd
(13:58:08) (ccodemastr-) fdsdfsd


and thx codemast , you're code is exacly what i wanted and it works perferct ^^ , i've add some colour so i m happy

thx for the very fast reply

mmm still have a question , i would like everithing to change .. even the /join /quit /me
Quote:
[20:48] * Parts: fly`
[20:48] * Joins: fly`
[20:48] * Aneia sets mode: +o fly`

thx for the very fast reply

Last edited by Misato; 06/07/03 06:50 PM.
Joined: Jul 2003
Posts: 4
M
Misato Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jul 2003
Posts: 4
moreover i'd like to know what are the others commands

on *:JOIN:*:#:{
on *:QUIT:*:#:{
on *:PART:*:#:{

wich one it is for actions ?? ( /me ....)
which variable is it to show the quit messages ?

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
ON ACTION is for /me.

And for ON QUIT the quit message is in $1-.

Try /help on quit

Joined: Jul 2003
Posts: 4
M
Misato Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jul 2003
Posts: 4
With this code :
Code:
 on 1:KICK:#:/echo -a 2(11 $+ $time $+ 2)  2 —›11 kick: $nick Oops! ;) 


I'm seeing this on my irc client !!
Quote:
[06:51] * fly` was kicked by fly_ayanami (fly_ayanami)
(06:51:52) —› kick: fly_ayanami Oops! wink


I want to remove " [06:51] * fly` was kicked by fly_ayanami (fly_ayanami) " but idon't know how to ... if anyone could tell me ?

I m having the same problem for " on 1:NICK: "



Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Go to File > Options > IRC > Events... > Kicks: Hide / Nicks: Hide.

Anyways I think your code is wrong because $nick is the identifier for the person who kicked $knick (the person who was kicked from the channel).
Though you could have wrote that code to say that $nick has kicked someone.

Anyway, alternatively you could use:
Code:
on ^*:KICK:#: {
echo $chan 2(11 $+ $time $+ 2)  2 —›11 kick: $knick Oops! ;)
haltdef
}

Rather than the File > Options > IRC. As the haltdef command halts default text. grin

Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Excluding the on INPUT event, whenever you're changed the default display of an event, you firstly must prefix it with ^ and end the event with either halt or haltdef

For what you're trying to do, you should be using this:
Code:
on [color:red]^[/color]*:KICK:#: {
  echo [color:red]$chan[/color] 2(11 $+ $time $+ 2)  2 —›11 kick: $nick Oops! ;)
  [color:red]haltdef[/color]
}


I've also added $chan into the echo command because if you use -a, it will always echo to the active window, regardless of what it is. Use $chan will make it so that it's only echos to that channel.


- Jason

Link Copied to Clipboard