|
action based on nickname
#255061
18/09/15 07:38 AM
|
Joined: Sep 2015
Posts: 6
Gustav
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2015
Posts: 6 |
So i have this script running: on *:action:$($+(*,slap,*,$me,*)):*:{
do something
} I need to edit this based on my nickname. Since i run mirc through my webserver and i change my nick if i'm connected to it or not, i need a check routine for my nickname to do something different.
on *:action:$($+(*,slap,*,$me,*)):*:{
if ($me.nick == away_nickname){
do something
} else {
do something else
} Could someone help me on this since i'm new on this ? 
|
|
|
Re: action based on nickname
[Re: Gustav]
#255062
18/09/15 08:38 AM
|
Joined: Dec 2014
Posts: 68
michaelukz
Babel fish
|
Babel fish
Joined: Dec 2014
Posts: 68 |
Here's a simple option :P on *:text:*:#: {
if ($nick == michalukz) {
msg $chan /me Hi, This is yodelling!
}
else {
return
}
}
|
|
|
Re: action based on nickname
[Re: michaelukz]
#255063
18/09/15 08:40 AM
|
Joined: Dec 2014
Posts: 68
michaelukz
Babel fish
|
Babel fish
Joined: Dec 2014
Posts: 68 |
Tested and it does work fine 
|
|
|
Re: action based on nickname
[Re: Gustav]
#255064
18/09/15 12:31 PM
|
Joined: Feb 2015
Posts: 243
OrFeAsGr
Fjord artisan
|
Fjord artisan
Joined: Feb 2015
Posts: 243 |
Your code is almost right!
on *:action:*:*:{
if ($+(*,slap*,$me,*) iswm $1-) {
if ($me == away_nickname){
do something
}
else {
do something else
}
}
}
This should do it! 
|
|
|
Re: action based on nickname
[Re: OrFeAsGr]
#255071
19/09/15 01:31 AM
|
Joined: Sep 2015
Posts: 6
Gustav
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2015
Posts: 6 |
Your code is almost right!
on *:action:*:*:{
if ($+(*,slap*,$me,*) iswm $1-) {
if ($me == away_nickname){
do something
}
else {
do something else
}
}
}
This should do it! The above code worked just fine. Aderfe orfea s'euxaristw poli. Gia na valw elegxo, text mention to nick mou, na kanei kati, pws tha to montarw? on *:text:*:*:{
if ($+(*,lekseis,lekseis,*) iswm $1-) {
;lekseis i $lekseis?
if ($me == nickname) {
kane_kati
}
}
Last edited by Gustav; 19/09/15 02:32 AM.
|
|
|
Re: action based on nickname
[Re: Gustav]
#255072
19/09/15 02:31 AM
|
Joined: Sep 2015
Posts: 6
Gustav
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2015
Posts: 6 |
To'kana monos mou telika  on *:text:*:#:{
if ($me isin $1-) {
....
}
Last edited by Gustav; 19/09/15 02:32 AM.
|
|
|
Re: action based on nickname
[Re: Gustav]
#255075
19/09/15 08:20 PM
|
Joined: Feb 2015
Posts: 243
OrFeAsGr
Fjord artisan
|
Fjord artisan
Joined: Feb 2015
Posts: 243 |
auto pou sou dwsa vale apla allakse to on *:action:*:#: { se on *:text:*:#: { (for those who might didnt understand this is Greeklish :P( Greek with English letters.. long story :P))
|
|
|
Re: action based on nickname
[Re: Gustav]
#255076
20/09/15 12:30 AM
|
Joined: Sep 2015
Posts: 1
sempatick
Mostly harmless
|
Mostly harmless
Joined: Sep 2015
Posts: 1 |
thanks for your nice share  i will try it in my server
|
|
|
Re: action based on nickname
[Re: sempatick]
#255127
25/09/15 04:08 AM
|
Joined: Feb 2015
Posts: 7
BigLamer
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Feb 2015
Posts: 7 |
you should add flood protection to stop script running when reached lines per time period
ON ^*:ACTION:*:#:{
if ($me isin $1-) && ($nick != $me) {
inc -eu10 %temp_num_ $+ $nick
if ($nick ison $chan) && ($var($+(%,temp_num_,$nick),1).value < 6) {
var %tmp_slap_reason $read(scripts/slaps.txt)
.describe $chan %tmp_slap_reason
......
or something like that auto pou sou dwsa vale apla allakse to on *:action:*:#: { se on *:text:*:#: { (for those who might didnt understand this is Greeklish :P( Greek with English letters.. long story :P)) Same as our Bulgarian shliokavica: makar da e otvratitelno, pomaga ot vreme na vreme:D
Last edited by BigLamer; 25/09/15 04:10 AM.
|
|
|
Re: action based on nickname
[Re: Gustav]
#255161
27/09/15 05:39 PM
|
Joined: Sep 2015
Posts: 6
Gustav
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2015
Posts: 6 |
So i have this code running on connect: on *:CONNECT:{
if $network == quakenet {
.timer 1 1 .msg q@cserve.quakenet.org AUTH %myauth $$?*
mode $me +x
j #channel1
j #channel2
j #channel3
...
j #channeln
}
} I need to modify it by adding an auth check BEFORE joins. I thought of adding a timer with infinite loops and interval 5 seconds. On each pulse i will check my address and if i'm authed Then i will join What i've got so far: on *:CONNECT: {
if $network == quakenet {
.timer 1 1 .msg q@cserve.quakenet.org AUTH %myauth $$?*
mode $me +x
.timer 0 2 {
if $remove($mid($address($me,2),4,99),@,.users.quakenet.org) != %mynick {
msg script-bot not authed
inc %trash
dec %trash
}
else {
msg script-bot authed
;j #channel_1
;j #channel_2
;j #channel_3
;...
;j #channel_n
.timer off
break
}
}
}
} What am i doing wrong and i can't get it to work?
|
|
|
Re: action based on nickname
[Re: Gustav]
#255183
28/09/15 01:51 PM
|
Joined: Feb 2015
Posts: 243
OrFeAsGr
Fjord artisan
|
Fjord artisan
Joined: Feb 2015
Posts: 243 |
;You have to use an alias cause the timer doesn't work that way.
alias checkauth {
if ($remove($mid($address($me,2),4,99),@,.users.quakenet.org) != $me) {
return not authed
}
elseif ($remove($mid($address($me,2),4,99),@,.users.quakenet.org) == $me) {
return Authed
}
}
on *:connect: {
if ($network == quakenet) {
.timer 1 1 .msg q@cserve.quakenet.org AUTH %myauth $$?*
mode $me +x
if ($checkauth == not authed) {
msg script-bot $v1
.msg q@cserve.quakenet.org AUTH %myauth $$?*
}
elseif ($checkauth == authed) {
msg script-bot $v1
;join channels here
}
}
}
This should work. If you need more or it doesn't work let me know! 
Last edited by OrFeAsGr; 28/09/15 01:55 PM.
|
|
|
|
|
|